public class JerseyInvocation extends Object implements jakarta.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 |
---|---|
jakarta.ws.rs.core.Response |
invoke() |
<T> T |
invoke(Class<T> responseType) |
<T> T |
invoke(jakarta.ws.rs.core.GenericType<T> responseType) |
JerseyInvocation |
property(String name,
Object value) |
Future<jakarta.ws.rs.core.Response> |
submit() |
<T> Future<T> |
submit(Class<T> responseType) |
<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 an
InvocationCallback to process the future result of the invocation. |
<T> Future<T> |
submit(jakarta.ws.rs.client.InvocationCallback<T> callback) |
String |
toString() |
public jakarta.ws.rs.core.Response invoke() throws jakarta.ws.rs.ProcessingException, jakarta.ws.rs.WebApplicationException
invoke
in interface jakarta.ws.rs.client.Invocation
jakarta.ws.rs.ProcessingException
jakarta.ws.rs.WebApplicationException
public <T> T invoke(Class<T> responseType) throws jakarta.ws.rs.ProcessingException, jakarta.ws.rs.WebApplicationException
invoke
in interface jakarta.ws.rs.client.Invocation
jakarta.ws.rs.ProcessingException
jakarta.ws.rs.WebApplicationException
public <T> T invoke(jakarta.ws.rs.core.GenericType<T> responseType) throws jakarta.ws.rs.ProcessingException, jakarta.ws.rs.WebApplicationException
invoke
in interface jakarta.ws.rs.client.Invocation
jakarta.ws.rs.ProcessingException
jakarta.ws.rs.WebApplicationException
public Future<jakarta.ws.rs.core.Response> submit()
submit
in interface jakarta.ws.rs.client.Invocation
public <T> Future<T> submit(Class<T> responseType)
submit
in interface jakarta.ws.rs.client.Invocation
public <T> Future<T> submit(jakarta.ws.rs.core.GenericType<T> responseType)
submit
in interface jakarta.ws.rs.client.Invocation
public <T> Future<T> submit(jakarta.ws.rs.client.InvocationCallback<T> callback)
submit
in interface jakarta.ws.rs.client.Invocation
public <T> Future<T> submit(jakarta.ws.rs.core.GenericType<T> responseType, jakarta.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 jakarta.ws.rs.client.Invocation
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.