use of io.joynr.dispatcher.rpc.RequestStatus in project joynr by bmwcarit.
the class Future method onSuccess.
/**
* Resolves the future using the given result
*
* @param result
* the result of the asynchronous call
*/
public void onSuccess(T result) {
try {
statusLock.lock();
value = result;
status = new RequestStatus(RequestStatusCode.OK);
statusLockChangedCondition.signalAll();
} catch (Exception e) {
status = new RequestStatus(RequestStatusCode.ERROR);
exception = new JoynrRuntimeException(e);
} finally {
statusLock.unlock();
}
}
use of io.joynr.dispatcher.rpc.RequestStatus in project joynr by bmwcarit.
the class Future method onFailure.
/**
* Terminates the future in error
*
* @param newException
* that caused the failure
*/
public void onFailure(JoynrException newException) {
exception = newException;
status = new RequestStatus(RequestStatusCode.ERROR);
try {
statusLock.lock();
statusLockChangedCondition.signalAll();
} finally {
statusLock.unlock();
}
}
Aggregations