public class JerseyInvocation extends Object implements javax.ws.rs.client.Invocation
JAX-RS client-side
request invocation contract.| Modifier and Type | Class and Description |
|---|---|
static class |
JerseyInvocation.Builder
Jersey-specific
client invocation builder. |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
invoke() |
<T> T |
invoke(Class<T> responseType) |
<T> T |
invoke(javax.ws.rs.core.GenericType<T> responseType) |
JerseyInvocation |
property(String name,
Object value) |
Future<javax.ws.rs.core.Response> |
submit() |
<T> Future<T> |
submit(Class<T> responseType) |
<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 an
InvocationCallback to process the future result of the invocation. |
<T> Future<T> |
submit(javax.ws.rs.client.InvocationCallback<T> callback) |
String |
toString() |
public javax.ws.rs.core.Response invoke()
throws javax.ws.rs.ProcessingException,
javax.ws.rs.WebApplicationException
invoke in interface javax.ws.rs.client.Invocationjavax.ws.rs.ProcessingExceptionjavax.ws.rs.WebApplicationExceptionpublic <T> T invoke(Class<T> responseType) throws javax.ws.rs.ProcessingException, javax.ws.rs.WebApplicationException
invoke in interface javax.ws.rs.client.Invocationjavax.ws.rs.ProcessingExceptionjavax.ws.rs.WebApplicationExceptionpublic <T> T invoke(javax.ws.rs.core.GenericType<T> responseType)
throws javax.ws.rs.ProcessingException,
javax.ws.rs.WebApplicationException
invoke in interface javax.ws.rs.client.Invocationjavax.ws.rs.ProcessingExceptionjavax.ws.rs.WebApplicationExceptionpublic Future<javax.ws.rs.core.Response> submit()
submit in interface javax.ws.rs.client.Invocationpublic <T> Future<T> submit(Class<T> responseType)
submit in interface javax.ws.rs.client.Invocationpublic <T> Future<T> submit(javax.ws.rs.core.GenericType<T> responseType)
submit in interface javax.ws.rs.client.Invocationpublic <T> Future<T> submit(javax.ws.rs.client.InvocationCallback<T> callback)
submit in interface javax.ws.rs.client.Invocationpublic <T> Future<T> submit(javax.ws.rs.core.GenericType<T> responseType, javax.ws.rs.client.InvocationCallback<T> callback)
InvocationCallback to process the future result of the invocation.
Response type in this case is taken from responseType param (if not null) rather
than from callback. This allows to pass callbacks like new InvocationCallback<>() {...}.
T - response typeresponseType - response type that is used instead of obtaining types from callback.callback - invocation callback for asynchronous processing of the
request invocation result.public JerseyInvocation property(String name, Object value)
property in interface javax.ws.rs.client.InvocationCopyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.