Interface InvocationCallback<RESPONSE>
- Type Parameters:
RESPONSE
- response type. It can be either a general-purposeResponse
or the anticipated response entity type.
- Since:
- 2.0
-
Method Summary
-
Method Details
-
completed
Called when the invocation was successfully completed. Note that this does not necessarily mean the response has bean fully read, which depends on the parameterized invocation callback response type.Once this invocation callback method returns, the underlying
Response
instance will be automatically closed by the runtime.- Parameters:
response
- response data.
-
failed
Called when the invocation has failed for any reason.Note that the provided
Throwable
may be aProcessingException
in case the invocation processing failure has been caused by a client-side runtime component error. TheThrowable
may also be aWebApplicationException
or one of its subclasses in case the response status code is notsuccessful
and the generic callback type is notResponse
. In case a processing of a properly received response fails, the wrapped processing exception will be ofResponseProcessingException
type and will contain theResponse
instance whose processing has failed. ACancellationException
would be indicate that the invocation has been cancelled. AnInterruptedException
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.- Parameters:
throwable
- contains failure details.
-