Package org.glassfish.jersey.client
Class JerseyInvocation
- java.lang.Object
-
- org.glassfish.jersey.client.JerseyInvocation
-
- All Implemented Interfaces:
jakarta.ws.rs.client.Invocation
public class JerseyInvocation extends Object implements jakarta.ws.rs.client.Invocation
Jersey implementation ofJAX-RS client-side request invocationcontract.- Author:
- Marek Potociar
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJerseyInvocation.BuilderJersey-specificclient invocation builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.ws.rs.core.Responseinvoke()<T> Tinvoke(jakarta.ws.rs.core.GenericType<T> responseType)<T> Tinvoke(Class<T> responseType)JerseyInvocationproperty(String name, Object value)Future<jakarta.ws.rs.core.Response>submit()<T> Future<T>submit(jakarta.ws.rs.client.InvocationCallback<T> callback)<T> Future<T>submit(jakarta.ws.rs.core.GenericType<T> responseType)<T> Future<T>submit(jakarta.ws.rs.core.GenericType<T> responseType, jakarta.ws.rs.client.InvocationCallback<T> callback)Submit the request for an asynchronous invocation and register anInvocationCallbackto process the future result of the invocation.<T> Future<T>submit(Class<T> responseType)StringtoString()
-
-
-
Method Detail
-
invoke
public jakarta.ws.rs.core.Response invoke() throws jakarta.ws.rs.ProcessingException, jakarta.ws.rs.WebApplicationException- Specified by:
invokein interfacejakarta.ws.rs.client.Invocation- Throws:
jakarta.ws.rs.ProcessingExceptionjakarta.ws.rs.WebApplicationException
-
invoke
public <T> T invoke(Class<T> responseType) throws jakarta.ws.rs.ProcessingException, jakarta.ws.rs.WebApplicationException
- Specified by:
invokein interfacejakarta.ws.rs.client.Invocation- Throws:
jakarta.ws.rs.ProcessingExceptionjakarta.ws.rs.WebApplicationException
-
invoke
public <T> T invoke(jakarta.ws.rs.core.GenericType<T> responseType) throws jakarta.ws.rs.ProcessingException, jakarta.ws.rs.WebApplicationException- Specified by:
invokein interfacejakarta.ws.rs.client.Invocation- Throws:
jakarta.ws.rs.ProcessingExceptionjakarta.ws.rs.WebApplicationException
-
submit
public Future<jakarta.ws.rs.core.Response> submit()
- Specified by:
submitin interfacejakarta.ws.rs.client.Invocation
-
submit
public <T> Future<T> submit(Class<T> responseType)
- Specified by:
submitin interfacejakarta.ws.rs.client.Invocation
-
submit
public <T> Future<T> submit(jakarta.ws.rs.core.GenericType<T> responseType)
- Specified by:
submitin interfacejakarta.ws.rs.client.Invocation
-
submit
public <T> Future<T> submit(jakarta.ws.rs.client.InvocationCallback<T> callback)
- Specified by:
submitin interfacejakarta.ws.rs.client.Invocation
-
submit
public <T> Future<T> submit(jakarta.ws.rs.core.GenericType<T> responseType, jakarta.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
public JerseyInvocation property(String name, Object value)
- Specified by:
propertyin interfacejakarta.ws.rs.client.Invocation
-
-