RESPONSE
- response type. It can be either a general-purpose
Response
or the anticipated response entity
type.public interface InvocationCallback<RESPONSE>
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(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.Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.