Class JerseyInvocation
java.lang.Object
org.glassfish.jersey.client.JerseyInvocation
- All Implemented Interfaces:
javax.ws.rs.client.Invocation
Jersey implementation of
JAX-RS client-side
request invocation contract.- Author:
- Marek Potociar (marek.potociar at oracle.com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classJersey-specificclient invocation builder. -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Responseinvoke()<T> T<T> Tinvoke(javax.ws.rs.core.GenericType<T> responseType) Future<javax.ws.rs.core.Response> submit()<T> Future<T> <T> Future<T> submit(javax.ws.rs.client.InvocationCallback<T> callback) <T> Future<T> submit(javax.ws.rs.core.GenericType<T> responseType) <T> Future<T> submit(javax.ws.rs.core.GenericType<T> responseType, javax.ws.rs.client.InvocationCallback<T> callback) Submit the request for an asynchronous invocation and register anInvocationCallbackto process the future result of the invocation.
-
Method Details
-
invoke
public javax.ws.rs.core.Response invoke() throws javax.ws.rs.ProcessingException, javax.ws.rs.WebApplicationException- Specified by:
invokein interfacejavax.ws.rs.client.Invocation- Throws:
javax.ws.rs.ProcessingExceptionjavax.ws.rs.WebApplicationException
-
invoke
public <T> T invoke(Class<T> responseType) throws javax.ws.rs.ProcessingException, javax.ws.rs.WebApplicationException - Specified by:
invokein interfacejavax.ws.rs.client.Invocation- Throws:
javax.ws.rs.ProcessingExceptionjavax.ws.rs.WebApplicationException
-
invoke
public <T> T invoke(javax.ws.rs.core.GenericType<T> responseType) throws javax.ws.rs.ProcessingException, javax.ws.rs.WebApplicationException - Specified by:
invokein interfacejavax.ws.rs.client.Invocation- Throws:
javax.ws.rs.ProcessingExceptionjavax.ws.rs.WebApplicationException
-
submit
- Specified by:
submitin interfacejavax.ws.rs.client.Invocation
-
submit
-
submit
- Specified by:
submitin interfacejavax.ws.rs.client.Invocation
-
submit
- Specified by:
submitin interfacejavax.ws.rs.client.Invocation
-
submit
public <T> Future<T> submit(javax.ws.rs.core.GenericType<T> responseType, javax.ws.rs.client.InvocationCallback<T> callback) Submit the request for an asynchronous invocation and register anInvocationCallbackto process the future result of the invocation.Response type in this case is taken from
responseTypeparam (if notnull) rather than fromcallback. This allows to pass callbacks likenew InvocationCallback<>() {...}.- Type Parameters:
T- response type- Parameters:
responseType- response type that is used instead of obtaining types fromcallback.callback- invocation callback for asynchronous processing of the request invocation result.- Returns:
- future response object of the specified type as a result of the request invocation.
-
property
- Specified by:
propertyin interfacejavax.ws.rs.client.Invocation
-