private class AbstractMethodMessageHandler.ReturnValueListenableFutureCallback extends java.lang.Object implements ListenableFutureCallback<java.lang.Object>
Modifier and Type | Field and Description |
---|---|
private InvocableHandlerMethod |
handlerMethod |
private Message<?> |
message |
Constructor and Description |
---|
ReturnValueListenableFutureCallback(InvocableHandlerMethod handlerMethod,
Message<?> message) |
Modifier and Type | Method and Description |
---|---|
private void |
handleFailure(java.lang.Throwable ex) |
void |
onFailure(java.lang.Throwable ex)
Called when the
ListenableFuture completes with failure. |
void |
onSuccess(java.lang.Object result)
Called when the
ListenableFuture completes with success. |
private final InvocableHandlerMethod handlerMethod
private final Message<?> message
public ReturnValueListenableFutureCallback(InvocableHandlerMethod handlerMethod, Message<?> message)
public void onSuccess(java.lang.Object result)
SuccessCallback
ListenableFuture
completes with success.
Note that Exceptions raised by this method are ignored.
onSuccess
in interface SuccessCallback<java.lang.Object>
result
- the resultpublic void onFailure(java.lang.Throwable ex)
FailureCallback
ListenableFuture
completes with failure.
Note that Exceptions raised by this method are ignored.
onFailure
in interface FailureCallback
ex
- the failureprivate void handleFailure(java.lang.Throwable ex)