|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.client.JerseyInvocation
public class JerseyInvocation
Jersey implementation of JAX-RS client-side
request invocation contract.
| Nested Class Summary | |
|---|---|
static class |
JerseyInvocation.Builder
Jersey-specific client invocation builder. |
| Method Summary | ||
|---|---|---|
Configuration |
configuration()
Get access to the underlying configuration. |
|
Response |
invoke()
Synchronously invoke the request and receive a response back. |
|
|
invoke(java.lang.Class<T> responseType)
Synchronously invoke the request and receive a response of the specified type back. |
|
|
invoke(GenericType<T> responseType)
Synchronously invoke the request and receive a response of the specified generic type back. |
|
java.util.concurrent.Future<Response> |
submit()
Submit the request for an asynchronous invocation and receive a future response back. |
|
|
submit(java.lang.Class<T> responseType)
Submit the request for an asynchronous invocation and receive a future response of the specified type back. |
|
|
submit(GenericType<T> responseType)
Submit the request for an asynchronous invocation and receive a future response of the specified generic type back. |
|
|
submit(InvocationCallback<T> callback)
Submit the request for an asynchronous invocation and register an InvocationCallback to process the future result of the invocation. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Response invoke()
throws ClientException,
WebApplicationException
Invocation
invoke in interface Invocationresponse object as a result of the request
invocation.
ClientException - in case the invocation processing has failed.
WebApplicationException
public <T> T invoke(java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
Invocation
invoke in interface InvocationT - 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.
public <T> T invoke(GenericType<T> responseType)
throws ClientException,
WebApplicationException
Invocation
invoke in interface InvocationT - 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.public java.util.concurrent.Future<Response> submit()
Invocation
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.
submit in interface Invocationresponse object as a result of the request
invocation.public <T> java.util.concurrent.Future<T> submit(java.lang.Class<T> responseType)
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 specified response type is not Response.
submit in interface InvocationT - response typeresponseType - Java type the response should be converted into.
public <T> java.util.concurrent.Future<T> submit(GenericType<T> responseType)
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 specified response type is not Response.
submit in interface InvocationT - generic response typeresponseType - type literal representing a generic Java type the
response should be converted into.
public <T> java.util.concurrent.Future<T> submit(InvocationCallback<T> callback)
InvocationInvocationCallback 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.
submit in interface InvocationT - response typecallback - invocation callback for asynchronous processing of the
request invocation result.
public Configuration configuration()
Invocationconfiguration.
configuration in interface Invocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||