public interface Invocation extends Configurable<Invocation>
Invocation.Builder| Modifier and Type | Interface and Description |
|---|---|
static interface |
Invocation.Builder
A client request invocation builder.
|
| Modifier and Type | Method and Description |
|---|---|
Response |
invoke()
Synchronously invoke the request and receive a response back.
|
<T> T |
invoke(Class<T> responseType)
Synchronously invoke the request and receive a response of the specified
type back.
|
<T> T |
invoke(GenericType<T> responseType)
Synchronously invoke the request and receive a response of the specified
generic type back.
|
Future<Response> |
submit()
Submit the request for an asynchronous invocation and receive a future
response back.
|
<T> Future<T> |
submit(Class<T> responseType)
Submit the request for an asynchronous invocation and receive a future
response of the specified type back.
|
<T> Future<T> |
submit(GenericType<T> responseType)
Submit the request for an asynchronous invocation and receive a future
response of the specified generic type back.
|
<T> Future<T> |
submit(InvocationCallback<T> callback)
Submit the request for an asynchronous invocation and register an
InvocationCallback to process the future result of the invocation. |
getConfiguration, register, register, register, register, register, register, register, register, replaceWith, setPropertyResponse invoke() throws ClientException
response object as a result of the request
invocation.ClientException - in case the invocation processing has failed.<T> T invoke(Class<T> responseType) throws ClientException, WebApplicationException
T - response typeresponseType - Java type the response should be converted into.ClientException - in case the invocation processing has failed.WebApplicationException - in case the response status code of the response
returned by the server is not
successful.<T> T invoke(GenericType<T> responseType) throws ClientException, WebApplicationException
T - generic response typeresponseType - type literal representing a generic Java type the
response should be converted into.ClientException - in case the invocation processing has failed.WebApplicationException - in case the response status code of the response
returned by the server is not
successful.Future<Response> submit()
Note that calling the Future.get() method on the returned
Future instance may throw an ExecutionException
that wraps an ClientException thrown in case of an invocation processing
failure.
response object as a result of the request
invocation.<T> Future<T> submit(Class<T> responseType)
Note that calling the Future.get() method on the returned
Future instance may throw an ExecutionException
that wraps either an ClientException thrown in case of an invocation processing
failure or a WebApplicationException or one of its subclasses thrown in case the
received response status code is not successful and the specified response type is not Response.
T - response typeresponseType - Java type the response should be converted into.<T> Future<T> submit(GenericType<T> responseType)
Note that calling the Future.get() method on the returned
Future instance may throw an ExecutionException
that wraps either an ClientException thrown in case of an invocation processing
failure or a WebApplicationException or one of its subclasses thrown in case the
received response status code is not successful and the specified response type is not Response.
T - generic response typeresponseType - type literal representing a generic Java type the
response should be converted into.<T> Future<T> submit(InvocationCallback<T> callback)
InvocationCallback to process the future result of the invocation.
Note that calling the Future.get() method on the returned
Future instance may throw an ExecutionException
that wraps either an ClientException thrown in case of an invocation processing
failure or a WebApplicationException or one of its subclasses thrown in case the
received response status code is not successful and the generic type of the supplied response callback is not
Response.
T - response typecallback - invocation callback for asynchronous processing of the
request invocation result.Copyright © 2013. All Rights Reserved.