this.transcript.traceDebugging ("processing the failure (error) response for pending request with token `%s` with message `%s`...", token.getMessageId (), errorPayload.getErrorMessage ());
this.pendingRequests.fail(token.getMessageId(), new Exception (errorPayload.getErrorMessage ()));
}
break;
case SUCCESS: {
final SuccessResponse successPayload = (SuccessResponse)message.payload;
final CompletionToken token = successPayload.getToken();
this.transcript.traceDebugging ("processing the success response for pending request with token `%s`...", token.getMessageId ());
if(successPayload.getSuccessful()){
this.pendingRequests.succeed(token.getMessageId(), null);
}else {
this.pendingRequests.fail(token.getMessageId(), new Exception ("I/O exception")); //TODO err message?
}
}