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 java.lang.Object
- implements Invocation.Builder
Jersey-specific client invocation builder.
|
Method Summary |
JerseyInvocation.Builder |
acceptLanguage(java.util.Locale... locales)
|
JerseyInvocation.Builder |
acceptLanguage(java.lang.String... locales)
|
AsyncInvoker |
async()
|
JerseyInvocation |
build(java.lang.String method)
|
JerseyInvocation |
build(java.lang.String method,
Entity<?> entity)
|
JerseyInvocation |
buildDelete()
|
JerseyInvocation |
buildGet()
|
JerseyInvocation |
buildPost(Entity<?> entity)
|
JerseyInvocation |
buildPut(Entity<?> entity)
|
JerseyInvocation.Builder |
cacheControl(CacheControl cacheControl)
|
ClientConfig |
configuration()
|
JerseyInvocation.Builder |
cookie(Cookie cookie)
|
Invocation.Builder |
cookie(java.lang.String name,
java.lang.String value)
|
Response |
delete()
|
|
delete(java.lang.Class<T> responseType)
|
|
delete(GenericType<T> responseType)
|
Response |
get()
|
|
get(java.lang.Class<T> responseType)
|
|
get(GenericType<T> responseType)
|
Response |
head()
|
JerseyInvocation.Builder |
header(java.lang.String name,
java.lang.Object value)
|
Invocation.Builder |
headers(MultivaluedMap<java.lang.String,java.lang.Object> headers)
|
Response |
method(java.lang.String name)
|
|
method(java.lang.String name,
java.lang.Class<T> responseType)
|
Response |
method(java.lang.String name,
Entity<?> entity)
|
|
method(java.lang.String name,
Entity<?> entity,
java.lang.Class<T> responseType)
|
|
method(java.lang.String name,
Entity<?> entity,
GenericType<T> responseType)
|
|
method(java.lang.String name,
GenericType<T> responseType)
|
Response |
options()
|
|
options(java.lang.Class<T> responseType)
|
|
options(GenericType<T> responseType)
|
Response |
post(Entity<?> entity)
|
|
post(Entity<?> entity,
java.lang.Class<T> responseType)
|
|
post(Entity<?> entity,
GenericType<T> responseType)
|
Response |
put(Entity<?> entity)
|
|
put(Entity<?> entity,
java.lang.Class<T> responseType)
|
|
put(Entity<?> entity,
GenericType<T> responseType)
|
Response |
trace()
|
|
trace(java.lang.Class<T> responseType)
|
|
trace(GenericType<T> responseType)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JerseyInvocation.Builder
protected JerseyInvocation.Builder(java.net.URI uri,
ClientConfig configuration)
- Create new Jersey-specific client invocation builder.
- Parameters:
uri - invoked request URI.configuration - Jersey client configuration.
build
public JerseyInvocation build(java.lang.String method)
- Specified by:
build in interface Invocation.Builder
build
public JerseyInvocation build(java.lang.String method,
Entity<?> entity)
- Specified by:
build in interface Invocation.Builder
buildGet
public JerseyInvocation buildGet()
- Specified by:
buildGet in interface Invocation.Builder
buildDelete
public JerseyInvocation buildDelete()
- Specified by:
buildDelete in interface Invocation.Builder
buildPost
public JerseyInvocation buildPost(Entity<?> entity)
- Specified by:
buildPost in interface Invocation.Builder
buildPut
public JerseyInvocation buildPut(Entity<?> entity)
- Specified by:
buildPut in interface Invocation.Builder
async
public AsyncInvoker async()
- Specified by:
async in interface Invocation.Builder
acceptLanguage
public JerseyInvocation.Builder acceptLanguage(java.util.Locale... locales)
- Specified by:
acceptLanguage in interface Invocation.Builder
acceptLanguage
public JerseyInvocation.Builder acceptLanguage(java.lang.String... locales)
- Specified by:
acceptLanguage in interface Invocation.Builder
cookie
public JerseyInvocation.Builder cookie(Cookie cookie)
- Specified by:
cookie in interface Invocation.Builder
cookie
public Invocation.Builder cookie(java.lang.String name,
java.lang.String value)
- Specified by:
cookie in interface Invocation.Builder
cacheControl
public JerseyInvocation.Builder cacheControl(CacheControl cacheControl)
- Specified by:
cacheControl in interface Invocation.Builder
header
public JerseyInvocation.Builder header(java.lang.String name,
java.lang.Object value)
- Specified by:
header in interface Invocation.Builder
headers
public Invocation.Builder headers(MultivaluedMap<java.lang.String,java.lang.Object> headers)
- Specified by:
headers in interface Invocation.Builder
configuration
public ClientConfig configuration()
- Specified by:
configuration in interface Invocation.Builder
get
public Response get()
throws ClientException
- Specified by:
get in interface SyncInvoker
- Throws:
ClientException
get
public <T> T get(java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
get in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
get
public <T> T get(GenericType<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
get in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
put
public Response put(Entity<?> entity)
throws ClientException
- Specified by:
put in interface SyncInvoker
- Throws:
ClientException
put
public <T> T put(Entity<?> entity,
java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
put in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
put
public <T> T put(Entity<?> entity,
GenericType<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
put in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
post
public Response post(Entity<?> entity)
throws ClientException
- Specified by:
post in interface SyncInvoker
- Throws:
ClientException
post
public <T> T post(Entity<?> entity,
java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
post in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
post
public <T> T post(Entity<?> entity,
GenericType<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
post in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
delete
public Response delete()
throws ClientException
- Specified by:
delete in interface SyncInvoker
- Throws:
ClientException
delete
public <T> T delete(java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
delete in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
delete
public <T> T delete(GenericType<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
delete in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
head
public Response head()
throws ClientException
- Specified by:
head in interface SyncInvoker
- Throws:
ClientException
options
public Response options()
throws ClientException
- Specified by:
options in interface SyncInvoker
- Throws:
ClientException
options
public <T> T options(java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
options in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
options
public <T> T options(GenericType<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
options in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
trace
public Response trace()
throws ClientException
- Specified by:
trace in interface SyncInvoker
- Throws:
ClientException
trace
public <T> T trace(java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
trace in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
trace
public <T> T trace(GenericType<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
trace in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
method
public Response method(java.lang.String name)
throws ClientException
- Specified by:
method in interface SyncInvoker
- Throws:
ClientException
method
public <T> T method(java.lang.String name,
java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
method in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
method
public <T> T method(java.lang.String name,
GenericType<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
method in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
method
public Response method(java.lang.String name,
Entity<?> entity)
throws ClientException
- Specified by:
method in interface SyncInvoker
- Throws:
ClientException
method
public <T> T method(java.lang.String name,
Entity<?> entity,
java.lang.Class<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
method in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
method
public <T> T method(java.lang.String name,
Entity<?> entity,
GenericType<T> responseType)
throws ClientException,
WebApplicationException
- Specified by:
method in interface SyncInvoker
- Throws:
ClientException
WebApplicationException
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.