package meerkat.pollingstation.controller.callbacks;

import com.google.common.util.concurrent.FutureCallback;
import meerkat.protobuf.PollingStation;

/**
 * Created by Laura on 3/20/2017.
 */
public class ScanErrorCallback extends ScanCallback implements FutureCallback<PollingStation.ErrorMsg> {

    private final PollingStation.ErrorMsg expectedErrorMessage;

    public ScanErrorCallback(PollingStation.ErrorMsg expectedErrorMessage) {
        this.expectedErrorMessage = expectedErrorMessage;
    }

    @Override
    public void onSuccess(PollingStation.ErrorMsg msg) {
//        dataIsAsExpected = false;
//        semaphore.release();
    }

    @Override
    public void onFailure(Throwable t) {
//        dataIsAsExpected = t.getMessage().equals(expectedErrorMessage);
//        semaphore.release();
    }
}
