public static class JerseyInvocation.Builder extends Object implements Invocation.Builder
client invocation builder
.Modifier | Constructor and Description |
---|---|
protected |
Builder(URI uri,
ClientConfig configuration)
Create new Jersey-specific client invocation builder.
|
protected Builder(URI uri, ClientConfig configuration)
uri
- invoked request URI.configuration
- Jersey client configuration.public JerseyInvocation build(String method)
build
in interface Invocation.Builder
public JerseyInvocation build(String method, Entity<?> entity)
build
in interface Invocation.Builder
public JerseyInvocation buildGet()
buildGet
in interface Invocation.Builder
public JerseyInvocation buildDelete()
buildDelete
in interface Invocation.Builder
public JerseyInvocation buildPost(Entity<?> entity)
buildPost
in interface Invocation.Builder
public JerseyInvocation buildPut(Entity<?> entity)
buildPut
in interface Invocation.Builder
public AsyncInvoker async()
async
in interface Invocation.Builder
public JerseyInvocation.Builder accept(String... mediaTypes)
accept
in interface Invocation.Builder
public JerseyInvocation.Builder accept(MediaType... mediaTypes)
accept
in interface Invocation.Builder
public Invocation.Builder acceptEncoding(String... encodings)
acceptEncoding
in interface Invocation.Builder
public JerseyInvocation.Builder acceptLanguage(Locale... locales)
acceptLanguage
in interface Invocation.Builder
public JerseyInvocation.Builder acceptLanguage(String... locales)
acceptLanguage
in interface Invocation.Builder
public JerseyInvocation.Builder cookie(Cookie cookie)
cookie
in interface Invocation.Builder
public JerseyInvocation.Builder cookie(String name, String value)
cookie
in interface Invocation.Builder
public JerseyInvocation.Builder cacheControl(CacheControl cacheControl)
cacheControl
in interface Invocation.Builder
public JerseyInvocation.Builder header(String name, Object value)
header
in interface Invocation.Builder
public JerseyInvocation.Builder headers(MultivaluedMap<String,Object> headers)
headers
in interface Invocation.Builder
public Response get() throws ProcessingException
get
in interface SyncInvoker
ProcessingException
public <T> T get(Class<T> responseType) throws ProcessingException, WebApplicationException
get
in interface SyncInvoker
ProcessingException
WebApplicationException
public <T> T get(GenericType<T> responseType) throws ProcessingException, WebApplicationException
get
in interface SyncInvoker
ProcessingException
WebApplicationException
public Response put(Entity<?> entity) throws ProcessingException
put
in interface SyncInvoker
ProcessingException
public <T> T put(Entity<?> entity, Class<T> responseType) throws ProcessingException, WebApplicationException
put
in interface SyncInvoker
ProcessingException
WebApplicationException
public <T> T put(Entity<?> entity, GenericType<T> responseType) throws ProcessingException, WebApplicationException
put
in interface SyncInvoker
ProcessingException
WebApplicationException
public Response post(Entity<?> entity) throws ProcessingException
post
in interface SyncInvoker
ProcessingException
public <T> T post(Entity<?> entity, Class<T> responseType) throws ProcessingException, WebApplicationException
post
in interface SyncInvoker
ProcessingException
WebApplicationException
public <T> T post(Entity<?> entity, GenericType<T> responseType) throws ProcessingException, WebApplicationException
post
in interface SyncInvoker
ProcessingException
WebApplicationException
public Response delete() throws ProcessingException
delete
in interface SyncInvoker
ProcessingException
public <T> T delete(Class<T> responseType) throws ProcessingException, WebApplicationException
delete
in interface SyncInvoker
ProcessingException
WebApplicationException
public <T> T delete(GenericType<T> responseType) throws ProcessingException, WebApplicationException
delete
in interface SyncInvoker
ProcessingException
WebApplicationException
public Response head() throws ProcessingException
head
in interface SyncInvoker
ProcessingException
public Response options() throws ProcessingException
options
in interface SyncInvoker
ProcessingException
public <T> T options(Class<T> responseType) throws ProcessingException, WebApplicationException
options
in interface SyncInvoker
ProcessingException
WebApplicationException
public <T> T options(GenericType<T> responseType) throws ProcessingException, WebApplicationException
options
in interface SyncInvoker
ProcessingException
WebApplicationException
public Response trace() throws ProcessingException
trace
in interface SyncInvoker
ProcessingException
public <T> T trace(Class<T> responseType) throws ProcessingException, WebApplicationException
trace
in interface SyncInvoker
ProcessingException
WebApplicationException
public <T> T trace(GenericType<T> responseType) throws ProcessingException, WebApplicationException
trace
in interface SyncInvoker
ProcessingException
WebApplicationException
public Response method(String name) throws ProcessingException
method
in interface SyncInvoker
ProcessingException
public <T> T method(String name, Class<T> responseType) throws ProcessingException, WebApplicationException
method
in interface SyncInvoker
ProcessingException
WebApplicationException
public <T> T method(String name, GenericType<T> responseType) throws ProcessingException, WebApplicationException
method
in interface SyncInvoker
ProcessingException
WebApplicationException
public Response method(String name, Entity<?> entity) throws ProcessingException
method
in interface SyncInvoker
ProcessingException
public <T> T method(String name, Entity<?> entity, Class<T> responseType) throws ProcessingException, WebApplicationException
method
in interface SyncInvoker
ProcessingException
WebApplicationException
public <T> T method(String name, Entity<?> entity, GenericType<T> responseType) throws ProcessingException, WebApplicationException
method
in interface SyncInvoker
ProcessingException
WebApplicationException
public JerseyInvocation.Builder property(String name, Object value)
property
in interface Invocation.Builder
public CompletionStageRxInvoker rx()
rx
in interface Invocation.Builder
public <T extends RxInvoker> T rx(Class<T> clazz)
rx
in interface Invocation.Builder
public JerseyInvocation.Builder setCancellable(Future cancellable)
ClientRequest
ClientRequest.isCancelled()
method. Can be used for instance
by CompletionStageRxInvoker
to pass the created CompletableFuture
to the provided SyncInvoker
.cancellable
- the Future
whose result of Future.cancel(boolean)
will be available by
ClientRequest.isCancelled()
.Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.