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