public class ClientInvocation extends Object implements javax.ws.rs.client.Invocation
Modifier and Type | Field and Description |
---|---|
protected ResteasyClient |
client |
protected ClientConfiguration |
configuration |
protected DelegatingOutputStream |
delegatingOutputStream |
protected Object |
entity |
protected Annotation[] |
entityAnnotations |
protected Class<?> |
entityClass |
protected Type |
entityGenericType |
protected OutputStream |
entityStream |
protected ClientRequestHeaders |
headers |
protected String |
method |
protected URI |
uri |
Constructor and Description |
---|
ClientInvocation(ResteasyClient client,
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,
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() |
Object |
getEntity() |
Annotation[] |
getEntityAnnotations() |
Class<?> |
getEntityClass() |
Type |
getEntityGenericType() |
OutputStream |
getEntityStream() |
ClientRequestHeaders |
getHeaders() |
String |
getMethod() |
Map<String,Object> |
getMutableProperties() |
javax.ws.rs.client.ClientRequestFilter[] |
getRequestFilters() |
javax.ws.rs.client.ClientResponseFilter[] |
getResponseFilters() |
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(Class<T> responseType) |
<T> T |
invoke(javax.ws.rs.core.GenericType<T> responseType) |
javax.ws.rs.client.Invocation |
property(String name,
Object value) |
void |
setDelegatingOutputStream(DelegatingOutputStream delegatingOutputStream) |
void |
setEntity(javax.ws.rs.client.Entity<?> entity) |
void |
setEntityAnnotations(Annotation[] entityAnnotations) |
void |
setEntityObject(Object ent) |
void |
setEntityStream(OutputStream entityStream) |
void |
setHeaders(ClientRequestHeaders headers) |
void |
setMethod(String method) |
void |
setUri(URI uri) |
Future<javax.ws.rs.core.Response> |
submit() |
<T> Future<T> |
submit(Class<T> responseType) |
<T> Future<T> |
submit(javax.ws.rs.core.GenericType<T> responseType) |
<T> Future<T> |
submit(javax.ws.rs.client.InvocationCallback<T> callback) |
void |
writeRequestBody(OutputStream outputStream) |
protected ResteasyClient client
protected ClientRequestHeaders headers
protected String method
protected Object entity
protected Type entityGenericType
protected Class<?> entityClass
protected Annotation[] entityAnnotations
protected ClientConfiguration configuration
protected URI uri
protected DelegatingOutputStream delegatingOutputStream
protected OutputStream entityStream
public ClientInvocation(ResteasyClient client, URI uri, ClientRequestHeaders headers, ClientConfiguration parent)
public static <T> T extractResult(javax.ws.rs.core.GenericType<T> responseType, javax.ws.rs.core.Response response, 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 OutputStream getEntityStream()
public void setEntityStream(OutputStream entityStream)
public URI getUri()
public void setUri(URI uri)
public Annotation[] getEntityAnnotations()
public void setEntityAnnotations(Annotation[] entityAnnotations)
public String getMethod()
public void setMethod(String method)
public void setHeaders(ClientRequestHeaders headers)
public Object getEntity()
public Type getEntityGenericType()
public Class<?> getEntityClass()
public ClientRequestHeaders getHeaders()
public void setEntity(javax.ws.rs.client.Entity<?> entity)
public void setEntityObject(Object ent)
public void writeRequestBody(OutputStream outputStream) throws IOException
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 javax.ws.rs.core.Response invoke()
invoke
in interface javax.ws.rs.client.Invocation
public <T> T invoke(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 Future<javax.ws.rs.core.Response> submit()
submit
in interface javax.ws.rs.client.Invocation
public <T> Future<T> submit(Class<T> responseType)
submit
in interface javax.ws.rs.client.Invocation
public <T> Future<T> submit(javax.ws.rs.core.GenericType<T> responseType)
submit
in interface javax.ws.rs.client.Invocation
public <T> Future<T> submit(javax.ws.rs.client.InvocationCallback<T> callback)
submit
in interface javax.ws.rs.client.Invocation
Copyright © 2017 JBoss by Red Hat. All rights reserved.