Class ClientInvocationBuilder
- java.lang.Object
-
- org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder
-
- All Implemented Interfaces:
javax.ws.rs.client.Invocation.Builder
,javax.ws.rs.client.SyncInvoker
public class ClientInvocationBuilder extends Object implements javax.ws.rs.client.Invocation.Builder
- Version:
- $Revision: 1 $
- Author:
- Bill Burke, Alessio Soldano
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientInvocation
invocation
-
Constructor Summary
Constructors Constructor Description ClientInvocationBuilder(ResteasyClient client, URI uri, ClientConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.client.Invocation.Builder
accept(String... mediaTypes)
javax.ws.rs.client.Invocation.Builder
accept(javax.ws.rs.core.MediaType... mediaTypes)
javax.ws.rs.client.Invocation.Builder
acceptEncoding(String... encodings)
javax.ws.rs.client.Invocation.Builder
acceptLanguage(String... locales)
javax.ws.rs.client.Invocation.Builder
acceptLanguage(Locale... locales)
javax.ws.rs.client.AsyncInvoker
async()
javax.ws.rs.client.Invocation
build(String method)
javax.ws.rs.client.Invocation
build(String method, javax.ws.rs.client.Entity<?> entity)
javax.ws.rs.client.Invocation
buildDelete()
javax.ws.rs.client.Invocation
buildGet()
javax.ws.rs.client.Invocation
buildPost(javax.ws.rs.client.Entity<?> entity)
javax.ws.rs.client.Invocation
buildPut(javax.ws.rs.client.Entity<?> entity)
javax.ws.rs.client.Invocation.Builder
cacheControl(javax.ws.rs.core.CacheControl cacheControl)
javax.ws.rs.client.Invocation.Builder
cookie(String name, String value)
javax.ws.rs.client.Invocation.Builder
cookie(javax.ws.rs.core.Cookie cookie)
protected ClientInvocation
createClientInvocation(ClientInvocation invocation)
protected ClientInvocation
createClientInvocation(ResteasyClient client, URI uri, ClientRequestHeaders headers, ClientConfiguration parent)
javax.ws.rs.core.Response
delete()
<T> T
delete(Class<T> responseType)
<T> T
delete(javax.ws.rs.core.GenericType<T> responseType)
javax.ws.rs.core.Response
get()
<T> T
get(Class<T> responseType)
<T> T
get(javax.ws.rs.core.GenericType<T> responseType)
ClientInvocation
getClientInvocation()
exposes the client invocation for easier integration with other librariesClientRequestHeaders
getHeaders()
javax.ws.rs.client.WebTarget
getTarget()
URI
getURI()
javax.ws.rs.core.Response
head()
javax.ws.rs.client.Invocation.Builder
header(String name, Object value)
javax.ws.rs.client.Invocation.Builder
headers(javax.ws.rs.core.MultivaluedMap<String,Object> headers)
boolean
isChunked()
javax.ws.rs.core.Response
method(String name)
<T> T
method(String name, Class<T> responseType)
javax.ws.rs.core.Response
method(String name, javax.ws.rs.client.Entity<?> entity)
<T> T
method(String name, javax.ws.rs.client.Entity<?> entity, Class<T> responseType)
<T> T
method(String name, javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
<T> T
method(String name, javax.ws.rs.core.GenericType<T> responseType)
javax.ws.rs.core.Response
options()
<T> T
options(Class<T> responseType)
<T> T
options(javax.ws.rs.core.GenericType<T> responseType)
javax.ws.rs.core.Response
patch(javax.ws.rs.client.Entity<?> entity)
<T> T
patch(javax.ws.rs.client.Entity<?> entity, Class<T> responseType)
<T> T
patch(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
javax.ws.rs.core.Response
post(javax.ws.rs.client.Entity<?> entity)
<T> T
post(javax.ws.rs.client.Entity<?> entity, Class<T> responseType)
<T> T
post(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
javax.ws.rs.client.Invocation.Builder
property(String name, Object value)
javax.ws.rs.core.Response
put(javax.ws.rs.client.Entity<?> entity)
<T> T
put(javax.ws.rs.client.Entity<?> entity, Class<T> responseType)
<T> T
put(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
javax.ws.rs.client.CompletionStageRxInvoker
rx()
<T extends javax.ws.rs.client.RxInvoker>
Trx(Class<T> clazz)
void
setChunked(boolean chunked)
void
setClientInvocation(ClientInvocation invocation)
void
setTarget(javax.ws.rs.client.WebTarget target)
javax.ws.rs.core.Response
trace()
<T> T
trace(Class<T> responseType)
<T> T
trace(javax.ws.rs.core.GenericType<T> responseType)
-
-
-
Field Detail
-
invocation
protected ClientInvocation invocation
-
-
Constructor Detail
-
ClientInvocationBuilder
public ClientInvocationBuilder(ResteasyClient client, URI uri, ClientConfiguration configuration)
-
-
Method Detail
-
createClientInvocation
protected ClientInvocation createClientInvocation(ResteasyClient client, URI uri, ClientRequestHeaders headers, ClientConfiguration parent)
-
createClientInvocation
protected ClientInvocation createClientInvocation(ClientInvocation invocation)
-
getHeaders
public ClientRequestHeaders getHeaders()
-
setClientInvocation
public void setClientInvocation(ClientInvocation invocation)
-
getClientInvocation
public ClientInvocation getClientInvocation()
exposes the client invocation for easier integration with other libraries- Returns:
- the underlying client invocation
-
accept
public javax.ws.rs.client.Invocation.Builder accept(String... mediaTypes)
- Specified by:
accept
in interfacejavax.ws.rs.client.Invocation.Builder
-
accept
public javax.ws.rs.client.Invocation.Builder accept(javax.ws.rs.core.MediaType... mediaTypes)
- Specified by:
accept
in interfacejavax.ws.rs.client.Invocation.Builder
-
acceptLanguage
public javax.ws.rs.client.Invocation.Builder acceptLanguage(Locale... locales)
- Specified by:
acceptLanguage
in interfacejavax.ws.rs.client.Invocation.Builder
-
acceptLanguage
public javax.ws.rs.client.Invocation.Builder acceptLanguage(String... locales)
- Specified by:
acceptLanguage
in interfacejavax.ws.rs.client.Invocation.Builder
-
acceptEncoding
public javax.ws.rs.client.Invocation.Builder acceptEncoding(String... encodings)
- Specified by:
acceptEncoding
in interfacejavax.ws.rs.client.Invocation.Builder
-
cookie
public javax.ws.rs.client.Invocation.Builder cookie(javax.ws.rs.core.Cookie cookie)
- Specified by:
cookie
in interfacejavax.ws.rs.client.Invocation.Builder
-
cookie
public javax.ws.rs.client.Invocation.Builder cookie(String name, String value)
- Specified by:
cookie
in interfacejavax.ws.rs.client.Invocation.Builder
-
cacheControl
public javax.ws.rs.client.Invocation.Builder cacheControl(javax.ws.rs.core.CacheControl cacheControl)
- Specified by:
cacheControl
in interfacejavax.ws.rs.client.Invocation.Builder
-
header
public javax.ws.rs.client.Invocation.Builder header(String name, Object value)
- Specified by:
header
in interfacejavax.ws.rs.client.Invocation.Builder
-
headers
public javax.ws.rs.client.Invocation.Builder headers(javax.ws.rs.core.MultivaluedMap<String,Object> headers)
- Specified by:
headers
in interfacejavax.ws.rs.client.Invocation.Builder
-
build
public javax.ws.rs.client.Invocation build(String method)
- Specified by:
build
in interfacejavax.ws.rs.client.Invocation.Builder
-
build
public javax.ws.rs.client.Invocation build(String method, javax.ws.rs.client.Entity<?> entity)
- Specified by:
build
in interfacejavax.ws.rs.client.Invocation.Builder
-
buildGet
public javax.ws.rs.client.Invocation buildGet()
- Specified by:
buildGet
in interfacejavax.ws.rs.client.Invocation.Builder
-
buildDelete
public javax.ws.rs.client.Invocation buildDelete()
- Specified by:
buildDelete
in interfacejavax.ws.rs.client.Invocation.Builder
-
buildPost
public javax.ws.rs.client.Invocation buildPost(javax.ws.rs.client.Entity<?> entity)
- Specified by:
buildPost
in interfacejavax.ws.rs.client.Invocation.Builder
-
buildPut
public javax.ws.rs.client.Invocation buildPut(javax.ws.rs.client.Entity<?> entity)
- Specified by:
buildPut
in interfacejavax.ws.rs.client.Invocation.Builder
-
async
public javax.ws.rs.client.AsyncInvoker async()
- Specified by:
async
in interfacejavax.ws.rs.client.Invocation.Builder
-
get
public javax.ws.rs.core.Response get()
- Specified by:
get
in interfacejavax.ws.rs.client.SyncInvoker
-
get
public <T> T get(Class<T> responseType)
- Specified by:
get
in interfacejavax.ws.rs.client.SyncInvoker
-
get
public <T> T get(javax.ws.rs.core.GenericType<T> responseType)
- Specified by:
get
in interfacejavax.ws.rs.client.SyncInvoker
-
put
public javax.ws.rs.core.Response put(javax.ws.rs.client.Entity<?> entity)
- Specified by:
put
in interfacejavax.ws.rs.client.SyncInvoker
-
put
public <T> T put(javax.ws.rs.client.Entity<?> entity, Class<T> responseType)
- Specified by:
put
in interfacejavax.ws.rs.client.SyncInvoker
-
put
public <T> T put(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
- Specified by:
put
in interfacejavax.ws.rs.client.SyncInvoker
-
post
public javax.ws.rs.core.Response post(javax.ws.rs.client.Entity<?> entity)
- Specified by:
post
in interfacejavax.ws.rs.client.SyncInvoker
-
post
public <T> T post(javax.ws.rs.client.Entity<?> entity, Class<T> responseType)
- Specified by:
post
in interfacejavax.ws.rs.client.SyncInvoker
-
post
public <T> T post(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
- Specified by:
post
in interfacejavax.ws.rs.client.SyncInvoker
-
delete
public javax.ws.rs.core.Response delete()
- Specified by:
delete
in interfacejavax.ws.rs.client.SyncInvoker
-
delete
public <T> T delete(Class<T> responseType)
- Specified by:
delete
in interfacejavax.ws.rs.client.SyncInvoker
-
delete
public <T> T delete(javax.ws.rs.core.GenericType<T> responseType)
- Specified by:
delete
in interfacejavax.ws.rs.client.SyncInvoker
-
head
public javax.ws.rs.core.Response head()
- Specified by:
head
in interfacejavax.ws.rs.client.SyncInvoker
-
options
public javax.ws.rs.core.Response options()
- Specified by:
options
in interfacejavax.ws.rs.client.SyncInvoker
-
options
public <T> T options(Class<T> responseType)
- Specified by:
options
in interfacejavax.ws.rs.client.SyncInvoker
-
options
public <T> T options(javax.ws.rs.core.GenericType<T> responseType)
- Specified by:
options
in interfacejavax.ws.rs.client.SyncInvoker
-
trace
public javax.ws.rs.core.Response trace()
- Specified by:
trace
in interfacejavax.ws.rs.client.SyncInvoker
-
trace
public <T> T trace(Class<T> responseType)
- Specified by:
trace
in interfacejavax.ws.rs.client.SyncInvoker
-
trace
public <T> T trace(javax.ws.rs.core.GenericType<T> responseType)
- Specified by:
trace
in interfacejavax.ws.rs.client.SyncInvoker
-
method
public javax.ws.rs.core.Response method(String name)
- Specified by:
method
in interfacejavax.ws.rs.client.SyncInvoker
-
method
public <T> T method(String name, Class<T> responseType)
- Specified by:
method
in interfacejavax.ws.rs.client.SyncInvoker
-
method
public <T> T method(String name, javax.ws.rs.core.GenericType<T> responseType)
- Specified by:
method
in interfacejavax.ws.rs.client.SyncInvoker
-
method
public javax.ws.rs.core.Response method(String name, javax.ws.rs.client.Entity<?> entity)
- Specified by:
method
in interfacejavax.ws.rs.client.SyncInvoker
-
method
public <T> T method(String name, javax.ws.rs.client.Entity<?> entity, Class<T> responseType)
- Specified by:
method
in interfacejavax.ws.rs.client.SyncInvoker
-
method
public <T> T method(String name, javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
- Specified by:
method
in interfacejavax.ws.rs.client.SyncInvoker
-
property
public javax.ws.rs.client.Invocation.Builder property(String name, Object value)
- Specified by:
property
in interfacejavax.ws.rs.client.Invocation.Builder
-
isChunked
public boolean isChunked()
-
setChunked
public void setChunked(boolean chunked)
-
rx
public javax.ws.rs.client.CompletionStageRxInvoker rx()
- Specified by:
rx
in interfacejavax.ws.rs.client.Invocation.Builder
-
rx
public <T extends javax.ws.rs.client.RxInvoker> T rx(Class<T> clazz)
- Specified by:
rx
in interfacejavax.ws.rs.client.Invocation.Builder
-
patch
public javax.ws.rs.core.Response patch(javax.ws.rs.client.Entity<?> entity)
-
patch
public <T> T patch(javax.ws.rs.client.Entity<?> entity, Class<T> responseType)
-
patch
public <T> T patch(javax.ws.rs.client.Entity<?> entity, javax.ws.rs.core.GenericType<T> responseType)
-
getURI
public URI getURI()
-
getTarget
public javax.ws.rs.client.WebTarget getTarget()
-
setTarget
public void setTarget(javax.ws.rs.client.WebTarget target)
-
-