if (call != null) {
call.setValue(value);
}
} else if (state == Status.ERROR.state) {
if (call != null) {
call.setException(new RemoteException(WritableUtils.readString(in), WritableUtils
.readString(in)));
}
} else if (state == Status.FATAL.state) {
RemoteException exception = new RemoteException(WritableUtils.readString(in),
WritableUtils.readString(in));
// the call will be removed from call map, we must set Exception here to notify
// the thread waited on the call
if (call != null) {
call.setException(exception);