Package org.glassfish.jersey.client
Class JerseyInvocation.Builder
- java.lang.Object
-
- org.glassfish.jersey.client.JerseyInvocation.Builder
-
- All Implemented Interfaces:
Invocation.Builder,SyncInvoker
- Enclosing class:
- JerseyInvocation
public static class JerseyInvocation.Builder extends Object implements Invocation.Builder
Jersey-specificclient invocation builder.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder(URI uri, ClientConfig configuration)Create new Jersey-specific client invocation builder.
-
Method Summary
-
-
-
Constructor Detail
-
Builder
protected Builder(URI uri, ClientConfig configuration)
Create new Jersey-specific client invocation builder.- Parameters:
uri- invoked request URI.configuration- Jersey client configuration.
-
-
Method Detail
-
build
public JerseyInvocation build(String method)
- Specified by:
buildin interfaceInvocation.Builder
-
build
public JerseyInvocation build(String method, Entity<?> entity)
- Specified by:
buildin interfaceInvocation.Builder
-
buildGet
public JerseyInvocation buildGet()
- Specified by:
buildGetin interfaceInvocation.Builder
-
buildDelete
public JerseyInvocation buildDelete()
- Specified by:
buildDeletein interfaceInvocation.Builder
-
buildPost
public JerseyInvocation buildPost(Entity<?> entity)
- Specified by:
buildPostin interfaceInvocation.Builder
-
buildPut
public JerseyInvocation buildPut(Entity<?> entity)
- Specified by:
buildPutin interfaceInvocation.Builder
-
async
public AsyncInvoker async()
- Specified by:
asyncin interfaceInvocation.Builder
-
accept
public JerseyInvocation.Builder accept(String... mediaTypes)
- Specified by:
acceptin interfaceInvocation.Builder
-
accept
public JerseyInvocation.Builder accept(MediaType... mediaTypes)
- Specified by:
acceptin interfaceInvocation.Builder
-
acceptEncoding
public Invocation.Builder acceptEncoding(String... encodings)
- Specified by:
acceptEncodingin interfaceInvocation.Builder
-
acceptLanguage
public JerseyInvocation.Builder acceptLanguage(Locale... locales)
- Specified by:
acceptLanguagein interfaceInvocation.Builder
-
acceptLanguage
public JerseyInvocation.Builder acceptLanguage(String... locales)
- Specified by:
acceptLanguagein interfaceInvocation.Builder
-
cookie
public JerseyInvocation.Builder cookie(Cookie cookie)
- Specified by:
cookiein interfaceInvocation.Builder
-
cookie
public JerseyInvocation.Builder cookie(String name, String value)
- Specified by:
cookiein interfaceInvocation.Builder
-
cacheControl
public JerseyInvocation.Builder cacheControl(CacheControl cacheControl)
- Specified by:
cacheControlin interfaceInvocation.Builder
-
header
public JerseyInvocation.Builder header(String name, Object value)
- Specified by:
headerin interfaceInvocation.Builder
-
headers
public JerseyInvocation.Builder headers(MultivaluedMap<String,Object> headers)
- Specified by:
headersin interfaceInvocation.Builder
-
get
public Response get() throws ProcessingException
- Specified by:
getin interfaceSyncInvoker- Throws:
ProcessingException
-
get
public <T> T get(Class<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
getin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
get
public <T> T get(GenericType<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
getin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
put
public Response put(Entity<?> entity) throws ProcessingException
- Specified by:
putin interfaceSyncInvoker- Throws:
ProcessingException
-
put
public <T> T put(Entity<?> entity, Class<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
putin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
put
public <T> T put(Entity<?> entity, GenericType<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
putin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
post
public Response post(Entity<?> entity) throws ProcessingException
- Specified by:
postin interfaceSyncInvoker- Throws:
ProcessingException
-
post
public <T> T post(Entity<?> entity, Class<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
postin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
post
public <T> T post(Entity<?> entity, GenericType<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
postin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
delete
public Response delete() throws ProcessingException
- Specified by:
deletein interfaceSyncInvoker- Throws:
ProcessingException
-
delete
public <T> T delete(Class<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
deletein interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
delete
public <T> T delete(GenericType<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
deletein interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
head
public Response head() throws ProcessingException
- Specified by:
headin interfaceSyncInvoker- Throws:
ProcessingException
-
options
public Response options() throws ProcessingException
- Specified by:
optionsin interfaceSyncInvoker- Throws:
ProcessingException
-
options
public <T> T options(Class<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
optionsin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
options
public <T> T options(GenericType<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
optionsin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
trace
public Response trace() throws ProcessingException
- Specified by:
tracein interfaceSyncInvoker- Throws:
ProcessingException
-
trace
public <T> T trace(Class<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
tracein interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
trace
public <T> T trace(GenericType<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
tracein interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
method
public Response method(String name) throws ProcessingException
- Specified by:
methodin interfaceSyncInvoker- Throws:
ProcessingException
-
method
public <T> T method(String name, Class<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
methodin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
method
public <T> T method(String name, GenericType<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
methodin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
method
public Response method(String name, Entity<?> entity) throws ProcessingException
- Specified by:
methodin interfaceSyncInvoker- Throws:
ProcessingException
-
method
public <T> T method(String name, Entity<?> entity, Class<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
methodin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
method
public <T> T method(String name, Entity<?> entity, GenericType<T> responseType) throws ProcessingException, WebApplicationException
- Specified by:
methodin interfaceSyncInvoker- Throws:
ProcessingExceptionWebApplicationException
-
property
public JerseyInvocation.Builder property(String name, Object value)
- Specified by:
propertyin interfaceInvocation.Builder
-
rx
public CompletionStageRxInvoker rx()
- Specified by:
rxin interfaceInvocation.Builder
-
rx
public <T extends RxInvoker> T rx(Class<T> clazz)
- Specified by:
rxin interfaceInvocation.Builder
-
-