RESPONSE
- response type. It can be either a general-purpose Response
or the
anticipated response entity type.public interface InvocationCallback<RESPONSE>
Modifier and Type | Method and Description |
---|---|
void |
completed(RESPONSE response)
Called when the invocation was successfully completed.
|
void |
failed(java.lang.Throwable throwable)
Called when the invocation has failed for any reason.
|
void completed(RESPONSE response)
Once this invocation callback method returns, the underlying Response
instance will be
automatically closed by the runtime.
response
- response data.void failed(java.lang.Throwable throwable)
Note that the provided Throwable
may be a ProcessingException
in case the invocation
processing failure has been caused by a client-side runtime component error. The Throwable
may also be a
WebApplicationException
or one of its subclasses in case the response status code is not
successful
and the generic callback type is not
Response
. In case a processing of a properly received response fails, the wrapped processing
exception will be of ResponseProcessingException
type and will contain the Response
instance whose processing has failed. A CancellationException
would be indicate that the
invocation has been cancelled. An InterruptedException
would indicate that the thread executing the
invocation has been interrupted.
Once this invocation callback method returns, the underlying Response
instance will be
automatically closed by the runtime.
throwable
- contains failure details.