public static class JerseyInvocation.Builder extends Object implements Invocation.Builder
client invocation builder.| Modifier | Constructor and Description |
|---|---|
protected |
JerseyInvocation.Builder(URI uri,
ClientConfig configuration)
Create new Jersey-specific client invocation builder.
|
protected JerseyInvocation.Builder(URI uri, ClientConfig configuration)
uri - invoked request URI.configuration - Jersey client configuration.public JerseyInvocation build(String method)
build in interface Invocation.Builderpublic JerseyInvocation build(String method, Entity<?> entity)
build in interface Invocation.Builderpublic JerseyInvocation buildGet()
buildGet in interface Invocation.Builderpublic JerseyInvocation buildDelete()
buildDelete in interface Invocation.Builderpublic JerseyInvocation buildPost(Entity<?> entity)
buildPost in interface Invocation.Builderpublic JerseyInvocation buildPut(Entity<?> entity)
buildPut in interface Invocation.Builderpublic AsyncInvoker async()
async in interface Invocation.Builderpublic JerseyInvocation.Builder acceptLanguage(Locale... locales)
acceptLanguage in interface Invocation.Builderpublic JerseyInvocation.Builder acceptLanguage(String... locales)
acceptLanguage in interface Invocation.Builderpublic JerseyInvocation.Builder cookie(Cookie cookie)
cookie in interface Invocation.Builderpublic JerseyInvocation.Builder cookie(String name, String value)
cookie in interface Invocation.Builderpublic JerseyInvocation.Builder cacheControl(CacheControl cacheControl)
cacheControl in interface Invocation.Builderpublic JerseyInvocation.Builder header(String name, Object value)
header in interface Invocation.Builderpublic JerseyInvocation.Builder headers(MultivaluedMap<String,Object> headers)
headers in interface Invocation.Builderpublic Response get() throws ClientException
get in interface SyncInvokerClientExceptionpublic <T> T get(Class<T> responseType) throws ClientException, WebApplicationException
get in interface SyncInvokerClientExceptionWebApplicationExceptionpublic <T> T get(GenericType<T> responseType) throws ClientException, WebApplicationException
get in interface SyncInvokerClientExceptionWebApplicationExceptionpublic Response put(Entity<?> entity) throws ClientException
put in interface SyncInvokerClientExceptionpublic <T> T put(Entity<?> entity, Class<T> responseType) throws ClientException, WebApplicationException
put in interface SyncInvokerClientExceptionWebApplicationExceptionpublic <T> T put(Entity<?> entity, GenericType<T> responseType) throws ClientException, WebApplicationException
put in interface SyncInvokerClientExceptionWebApplicationExceptionpublic Response post(Entity<?> entity) throws ClientException
post in interface SyncInvokerClientExceptionpublic <T> T post(Entity<?> entity, Class<T> responseType) throws ClientException, WebApplicationException
post in interface SyncInvokerClientExceptionWebApplicationExceptionpublic <T> T post(Entity<?> entity, GenericType<T> responseType) throws ClientException, WebApplicationException
post in interface SyncInvokerClientExceptionWebApplicationExceptionpublic Response delete() throws ClientException
delete in interface SyncInvokerClientExceptionpublic <T> T delete(Class<T> responseType) throws ClientException, WebApplicationException
delete in interface SyncInvokerClientExceptionWebApplicationExceptionpublic <T> T delete(GenericType<T> responseType) throws ClientException, WebApplicationException
delete in interface SyncInvokerClientExceptionWebApplicationExceptionpublic Response head() throws ClientException
head in interface SyncInvokerClientExceptionpublic Response options() throws ClientException
options in interface SyncInvokerClientExceptionpublic <T> T options(Class<T> responseType) throws ClientException, WebApplicationException
options in interface SyncInvokerClientExceptionWebApplicationExceptionpublic <T> T options(GenericType<T> responseType) throws ClientException, WebApplicationException
options in interface SyncInvokerClientExceptionWebApplicationExceptionpublic Response trace() throws ClientException
trace in interface SyncInvokerClientExceptionpublic <T> T trace(Class<T> responseType) throws ClientException, WebApplicationException
trace in interface SyncInvokerClientExceptionWebApplicationExceptionpublic <T> T trace(GenericType<T> responseType) throws ClientException, WebApplicationException
trace in interface SyncInvokerClientExceptionWebApplicationExceptionpublic Response method(String name) throws ClientException
method in interface SyncInvokerClientExceptionpublic <T> T method(String name, Class<T> responseType) throws ClientException, WebApplicationException
method in interface SyncInvokerClientExceptionWebApplicationExceptionpublic <T> T method(String name, GenericType<T> responseType) throws ClientException, WebApplicationException
method in interface SyncInvokerClientExceptionWebApplicationExceptionpublic Response method(String name, Entity<?> entity) throws ClientException
method in interface SyncInvokerClientExceptionpublic <T> T method(String name, Entity<?> entity, Class<T> responseType) throws ClientException, WebApplicationException
method in interface SyncInvokerClientExceptionWebApplicationExceptionpublic <T> T method(String name, Entity<?> entity, GenericType<T> responseType) throws ClientException, WebApplicationException
method in interface SyncInvokerClientExceptionWebApplicationExceptionpublic JerseyInvocation.Builder setProperty(String name, Object value)
setProperty in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder register(Class<?> providerClass)
register in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder register(Class<?> providerClass, int bindingPriority)
register in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder register(Class<?> providerClass, Class<?>... contracts)
register in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder register(Class<?> providerClass, Map<Class<?>,Integer> contracts)
register in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder register(Object provider)
register in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder register(Object provider, int bindingPriority)
register in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder register(Object provider, Class<?>... contracts)
register in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder register(Object provider, Map<Class<?>,Integer> contracts)
register in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder replaceWith(Configuration config)
replaceWith in interface Configurable<Invocation.Builder>public ClientConfig getConfiguration()
getConfiguration in interface Configurable<Invocation.Builder>public JerseyInvocation.Builder preInitialize()
configuration of this invocation builder in order to improve
performance during the first request.
Once this method is called no other method implementing Configurable must be called
on this pre initialized invocation builder otherwise invocation builder will change back to uninitialized.Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.