public class ClientInvocation extends Object implements javax.ws.rs.client.Invocation
Modifier and Type | Field and Description |
---|---|
protected javax.ws.rs.client.WebTarget |
actualTarget |
protected boolean |
chunked |
protected ResteasyClient |
client |
protected ClientInvoker |
clientInvoker |
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 RESTEasyTracingLogger |
tracingLogger |
protected URI |
uri |
Modifier | Constructor and Description |
---|---|
protected |
ClientInvocation(ClientInvocation clientInvocation) |
|
ClientInvocation(ResteasyClient client,
URI uri,
ClientRequestHeaders headers,
ClientConfiguration parent) |
Modifier and Type | Method and Description |
---|---|
ExecutorService |
asyncInvocationExecutor() |
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.
|
protected ClientResponse |
filterRequest(ClientRequestContextImpl requestContext) |
protected ClientResponse |
filterResponse(ClientRequestContextImpl requestContext,
ClientResponse response) |
javax.ws.rs.client.WebTarget |
getActualTarget() |
ResteasyClient |
getClient() |
ClientConfiguration |
getClientConfiguration() |
ClientInvoker |
getClientInvoker() |
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() |
RESTEasyTracingLogger |
getTracingLogger() |
URI |
getUri() |
javax.ws.rs.ext.WriterInterceptor[] |
getWriterInterceptors() |
static <T> T |
handleErrorStatus(javax.ws.rs.core.Response response)
Throw an exception.
|
ClientResponse |
invoke() |
<T> T |
invoke(Class<T> responseType) |
<T> T |
invoke(javax.ws.rs.core.GenericType<T> responseType) |
boolean |
isChunked() |
javax.ws.rs.client.Invocation |
property(String name,
Object value) |
void |
setActualTarget(javax.ws.rs.client.WebTarget target) |
void |
setChunked(boolean chunked) |
void |
setClientInvoker(ClientInvoker clientInvoker) |
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) |
CompletableFuture<javax.ws.rs.core.Response> |
submitCF() |
<T> CompletableFuture<T> |
submitCF(Class<T> responseType) |
<T> CompletableFuture<T> |
submitCF(javax.ws.rs.core.GenericType<T> responseType) |
void |
writeRequestBody(OutputStream outputStream) |
protected RESTEasyTracingLogger tracingLogger
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 boolean chunked
protected ClientInvoker clientInvoker
protected javax.ws.rs.client.WebTarget actualTarget
protected DelegatingOutputStream delegatingOutputStream
protected OutputStream entityStream
public ClientInvocation(ResteasyClient client, URI uri, ClientRequestHeaders headers, ClientConfiguration parent)
protected ClientInvocation(ClientInvocation clientInvocation)
public static <T> T extractResult(javax.ws.rs.core.GenericType<T> responseType, javax.ws.rs.core.Response response, Annotation[] annotations)
T
- typeresponseType
- generic typeresponse
- response entityannotations
- array of annotationspublic static <T> T handleErrorStatus(javax.ws.rs.core.Response response)
T
- typeresponse
- response entitypublic 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 boolean isChunked()
public void setChunked(boolean chunked)
public ClientResponse 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
public ExecutorService asyncInvocationExecutor()
public CompletableFuture<javax.ws.rs.core.Response> submitCF()
public <T> CompletableFuture<T> submitCF(Class<T> responseType)
public <T> CompletableFuture<T> submitCF(javax.ws.rs.core.GenericType<T> responseType)
public javax.ws.rs.client.Invocation property(String name, Object value)
property
in interface javax.ws.rs.client.Invocation
public ClientInvoker getClientInvoker()
public void setClientInvoker(ClientInvoker clientInvoker)
protected ClientResponse filterRequest(ClientRequestContextImpl requestContext)
protected ClientResponse filterResponse(ClientRequestContextImpl requestContext, ClientResponse response)
public RESTEasyTracingLogger getTracingLogger()
public void setActualTarget(javax.ws.rs.client.WebTarget target)
public javax.ws.rs.client.WebTarget getActualTarget()
Copyright © 2020 JBoss by Red Hat. All rights reserved.