public class ClientInvocation
extends java.lang.Object
implements javax.ws.rs.client.Invocation
Modifier and Type | Field and Description |
---|---|
protected boolean |
chunked |
protected ResteasyClient |
client |
protected ClientConfiguration |
configuration |
protected DelegatingOutputStream |
delegatingOutputStream |
protected java.lang.Object |
entity |
protected java.lang.annotation.Annotation[] |
entityAnnotations |
protected java.lang.Class<?> |
entityClass |
protected java.lang.reflect.Type |
entityGenericType |
protected java.io.OutputStream |
entityStream |
protected ClientRequestHeaders |
headers |
protected java.lang.String |
method |
protected java.net.URI |
uri |
Constructor and Description |
---|
ClientInvocation(ResteasyClient client,
java.net.URI uri,
ClientRequestHeaders headers,
ClientConfiguration parent) |
Modifier and Type | Method and Description |
---|---|
static <T> T |
extractResult(javax.ws.rs.core.GenericType<T> responseType,
javax.ws.rs.core.Response response,
java.lang.annotation.Annotation[] annotations)
Extracts result from response throwing an appropriate exception if not a successful response.
|
ResteasyClient |
getClient() |
ClientConfiguration |
getClientConfiguration() |
javax.ws.rs.core.Configuration |
getConfiguration() |
DelegatingOutputStream |
getDelegatingOutputStream() |
java.lang.Object |
getEntity() |
java.lang.annotation.Annotation[] |
getEntityAnnotations() |
java.lang.Class<?> |
getEntityClass() |
java.lang.reflect.Type |
getEntityGenericType() |
java.io.OutputStream |
getEntityStream() |
ClientRequestHeaders |
getHeaders() |
java.lang.String |
getMethod() |
java.util.Map<java.lang.String,java.lang.Object> |
getMutableProperties() |
javax.ws.rs.client.ClientRequestFilter[] |
getRequestFilters() |
javax.ws.rs.client.ClientResponseFilter[] |
getResponseFilters() |
java.net.URI |
getUri() |
javax.ws.rs.ext.WriterInterceptor[] |
getWriterInterceptors() |
static <T> T |
handleErrorStatus(javax.ws.rs.core.Response response)
Throw an exception.
|
javax.ws.rs.core.Response |
invoke() |
<T> T |
invoke(java.lang.Class<T> responseType) |
<T> T |
invoke(javax.ws.rs.core.GenericType<T> responseType) |
boolean |
isChunked() |
javax.ws.rs.client.Invocation |
property(java.lang.String name,
java.lang.Object value) |
void |
setChunked(boolean chunked) |
void |
setDelegatingOutputStream(DelegatingOutputStream delegatingOutputStream) |
void |
setEntity(javax.ws.rs.client.Entity<?> entity) |
void |
setEntityAnnotations(java.lang.annotation.Annotation[] entityAnnotations) |
void |
setEntityObject(java.lang.Object ent) |
void |
setEntityStream(java.io.OutputStream entityStream) |
void |
setHeaders(ClientRequestHeaders headers) |
void |
setMethod(java.lang.String method) |
void |
setUri(java.net.URI uri) |
java.util.concurrent.Future<javax.ws.rs.core.Response> |
submit() |
<T> java.util.concurrent.Future<T> |
submit(java.lang.Class<T> responseType) |
<T> java.util.concurrent.Future<T> |
submit(javax.ws.rs.core.GenericType<T> responseType) |
<T> java.util.concurrent.Future<T> |
submit(javax.ws.rs.client.InvocationCallback<T> callback) |
void |
writeRequestBody(java.io.OutputStream outputStream) |
protected ResteasyClient client
protected ClientRequestHeaders headers
protected java.lang.String method
protected java.lang.Object entity
protected java.lang.reflect.Type entityGenericType
protected java.lang.Class<?> entityClass
protected java.lang.annotation.Annotation[] entityAnnotations
protected ClientConfiguration configuration
protected java.net.URI uri
protected boolean chunked
protected DelegatingOutputStream delegatingOutputStream
protected java.io.OutputStream entityStream
public ClientInvocation(ResteasyClient client, java.net.URI uri, ClientRequestHeaders headers, ClientConfiguration parent)
public static <T> T extractResult(javax.ws.rs.core.GenericType<T> responseType, javax.ws.rs.core.Response response, java.lang.annotation.Annotation[] annotations)
T
- responseType
- response
- annotations
- public static <T> T handleErrorStatus(javax.ws.rs.core.Response response)
T
- response
- public ClientConfiguration getClientConfiguration()
public ResteasyClient getClient()
public DelegatingOutputStream getDelegatingOutputStream()
public void setDelegatingOutputStream(DelegatingOutputStream delegatingOutputStream)
public java.io.OutputStream getEntityStream()
public void setEntityStream(java.io.OutputStream entityStream)
public java.net.URI getUri()
public void setUri(java.net.URI uri)
public java.lang.annotation.Annotation[] getEntityAnnotations()
public void setEntityAnnotations(java.lang.annotation.Annotation[] entityAnnotations)
public java.lang.String getMethod()
public void setMethod(java.lang.String method)
public void setHeaders(ClientRequestHeaders headers)
public java.util.Map<java.lang.String,java.lang.Object> getMutableProperties()
public java.lang.Object getEntity()
public java.lang.reflect.Type getEntityGenericType()
public java.lang.Class<?> getEntityClass()
public ClientRequestHeaders getHeaders()
public void setEntity(javax.ws.rs.client.Entity<?> entity)
public void setEntityObject(java.lang.Object ent)
public void writeRequestBody(java.io.OutputStream outputStream) throws java.io.IOException
java.io.IOException
public javax.ws.rs.ext.WriterInterceptor[] getWriterInterceptors()
public javax.ws.rs.client.ClientRequestFilter[] getRequestFilters()
public javax.ws.rs.client.ClientResponseFilter[] getResponseFilters()
public javax.ws.rs.core.Configuration getConfiguration()
public boolean isChunked()
public void setChunked(boolean chunked)
public javax.ws.rs.core.Response invoke()
invoke
in interface javax.ws.rs.client.Invocation
public <T> T invoke(java.lang.Class<T> responseType)
invoke
in interface javax.ws.rs.client.Invocation
public <T> T invoke(javax.ws.rs.core.GenericType<T> responseType)
invoke
in interface javax.ws.rs.client.Invocation
public java.util.concurrent.Future<javax.ws.rs.core.Response> submit()
submit
in interface javax.ws.rs.client.Invocation
public <T> java.util.concurrent.Future<T> submit(java.lang.Class<T> responseType)
submit
in interface javax.ws.rs.client.Invocation
public <T> java.util.concurrent.Future<T> submit(javax.ws.rs.core.GenericType<T> responseType)
submit
in interface javax.ws.rs.client.Invocation
public <T> java.util.concurrent.Future<T> submit(javax.ws.rs.client.InvocationCallback<T> callback)
submit
in interface javax.ws.rs.client.Invocation
public javax.ws.rs.client.Invocation property(java.lang.String name, java.lang.Object value)
property
in interface javax.ws.rs.client.Invocation