if (!loggedIn) {
logger.log(
Level.FINE,
"request received before login completed:{0}", this);
future.setException(
new RequestFailureException(
"session is not logged in",
RequestFailureException.FailureReason.LOGIN_PENDING));
return false;
} else if (relocatePrepareCompletionHandler != null &&
relocatePrepareCompletionHandler.isCompleted()) {
logger.log(
Level.FINE,
"request received while session is relocating:{0}", this);
future.setException(
new RequestFailureException(
"session is relocating",
RequestFailureException.FailureReason.RELOCATE_PENDING));
return false;
} else if (!isConnected()) {
logger.log(
Level.FINE,
"request received while session is disconnecting:{0}", this);
future.setException(
new RequestFailureException(
"session is disconnecting",
RequestFailureException.FailureReason.DISCONNECT_PENDING));
return false;
} else {
return true;