Class ClientInvocation
java.lang.Object
org.jboss.resteasy.client.jaxrs.internal.ClientInvocation
- All Implemented Interfaces:
jakarta.ws.rs.client.Invocation
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.ws.rs.client.Invocation
jakarta.ws.rs.client.Invocation.Builder
-
Field Summary
Modifier and TypeFieldDescriptionprotected jakarta.ws.rs.client.WebTarget
protected boolean
protected ResteasyClient
protected ClientInvoker
protected ClientConfiguration
protected DelegatingOutputStream
protected Object
protected Annotation[]
protected Class<?>
protected Type
protected OutputStream
protected ClientRequestHeaders
protected String
protected RESTEasyTracingLogger
protected URI
-
Constructor Summary
ModifierConstructorDescriptionprotected
ClientInvocation
(ClientInvocation clientInvocation) ClientInvocation
(ResteasyClient client, URI uri, ClientRequestHeaders headers, ClientConfiguration parent) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
extractResult
(jakarta.ws.rs.core.GenericType<T> responseType, jakarta.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) jakarta.ws.rs.client.WebTarget
jakarta.ws.rs.core.Configuration
Class<?>
protected static <T> AsyncClientHttpEngine.ResultExtractor<T>
getGenericTypeExtractor
(jakarta.ws.rs.core.GenericType<T> responseType) jakarta.ws.rs.client.ClientRequestFilter[]
jakarta.ws.rs.client.ClientResponseFilter[]
protected static <T> AsyncClientHttpEngine.ResultExtractor<T>
getResponseTypeExtractor
(Class<T> responseType) getUri()
jakarta.ws.rs.ext.WriterInterceptor[]
static <T> T
handleErrorStatus
(jakarta.ws.rs.core.Response response) Throw an exception.invoke()
<T> T
invoke
(jakarta.ws.rs.core.GenericType<T> responseType) <T> T
boolean
jakarta.ws.rs.client.Invocation
Optional<org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.ReactiveInvocation>
reactive()
If the client's HTTP engine implementsReactiveClientHttpEngine
then you can access the latter'sPublisher
via this method.void
setActualTarget
(jakarta.ws.rs.client.WebTarget target) void
setChunked
(boolean chunked) void
setClientInvoker
(ClientInvoker clientInvoker) void
setDelegatingOutputStream
(DelegatingOutputStream delegatingOutputStream) void
setEntity
(jakarta.ws.rs.client.Entity<?> entity) void
setEntityAnnotations
(Annotation[] entityAnnotations) void
setEntityObject
(Object ent) void
setEntityStream
(OutputStream entityStream) void
setHeaders
(ClientRequestHeaders headers) void
void
Future<jakarta.ws.rs.core.Response>
submit()
<T> Future<T>
submit
(jakarta.ws.rs.client.InvocationCallback<T> callback) <T> Future<T>
submit
(jakarta.ws.rs.core.GenericType<T> responseType) <T> Future<T>
CompletableFuture<jakarta.ws.rs.core.Response>
submitCF()
<T> CompletableFuture<T>
submitCF
(jakarta.ws.rs.core.GenericType<T> responseType) <T> CompletableFuture<T>
void
writeRequestBody
(OutputStream outputStream)
-
Field Details
-
tracingLogger
-
client
-
headers
-
method
-
entity
-
entityGenericType
-
entityClass
-
entityAnnotations
-
configuration
-
uri
-
chunked
protected boolean chunked -
clientInvoker
-
actualTarget
protected jakarta.ws.rs.client.WebTarget actualTarget -
delegatingOutputStream
-
entityStream
-
-
Constructor Details
-
ClientInvocation
public ClientInvocation(ResteasyClient client, URI uri, ClientRequestHeaders headers, ClientConfiguration parent) -
ClientInvocation
-
-
Method Details
-
extractResult
public static <T> T extractResult(jakarta.ws.rs.core.GenericType<T> responseType, jakarta.ws.rs.core.Response response, Annotation[] annotations) Extracts result from response throwing an appropriate exception if not a successful response.- Type Parameters:
T
- type- Parameters:
responseType
- generic typeresponse
- response entityannotations
- array of annotations- Returns:
- extracted result of type T
-
handleErrorStatus
public static <T> T handleErrorStatus(jakarta.ws.rs.core.Response response) Throw an exception. Expecting a status of 400 or greater.- Type Parameters:
T
- type- Parameters:
response
- response entity- Returns:
- unreachable
-
getClientConfiguration
-
getClient
-
getDelegatingOutputStream
-
setDelegatingOutputStream
-
getEntityStream
-
setEntityStream
-
getUri
-
setUri
-
getEntityAnnotations
-
setEntityAnnotations
-
getMethod
-
setMethod
-
setHeaders
-
getMutableProperties
-
getEntity
-
getEntityGenericType
-
getEntityClass
-
getHeaders
-
setEntity
public void setEntity(jakarta.ws.rs.client.Entity<?> entity) -
setEntityObject
-
writeRequestBody
- Throws:
IOException
-
getWriterInterceptors
public jakarta.ws.rs.ext.WriterInterceptor[] getWriterInterceptors() -
getRequestFilters
public jakarta.ws.rs.client.ClientRequestFilter[] getRequestFilters() -
getResponseFilters
public jakarta.ws.rs.client.ClientResponseFilter[] getResponseFilters() -
getConfiguration
public jakarta.ws.rs.core.Configuration getConfiguration() -
isChunked
public boolean isChunked() -
setChunked
public void setChunked(boolean chunked) -
invoke
- Specified by:
invoke
in interfacejakarta.ws.rs.client.Invocation
-
invoke
- Specified by:
invoke
in interfacejakarta.ws.rs.client.Invocation
-
invoke
public <T> T invoke(jakarta.ws.rs.core.GenericType<T> responseType) - Specified by:
invoke
in interfacejakarta.ws.rs.client.Invocation
-
submit
- Specified by:
submit
in interfacejakarta.ws.rs.client.Invocation
-
submit
- Specified by:
submit
in interfacejakarta.ws.rs.client.Invocation
-
submit
- Specified by:
submit
in interfacejakarta.ws.rs.client.Invocation
-
submit
- Specified by:
submit
in interfacejakarta.ws.rs.client.Invocation
-
asyncInvocationExecutor
-
getGenericTypeExtractor
protected static <T> AsyncClientHttpEngine.ResultExtractor<T> getGenericTypeExtractor(jakarta.ws.rs.core.GenericType<T> responseType) -
getResponseTypeExtractor
protected static <T> AsyncClientHttpEngine.ResultExtractor<T> getResponseTypeExtractor(Class<T> responseType) -
submitCF
-
submitCF
-
submitCF
-
reactive
public Optional<org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.ReactiveInvocation> reactive()If the client's HTTP engine implementsReactiveClientHttpEngine
then you can access the latter'sPublisher
via this method. -
property
- Specified by:
property
in interfacejakarta.ws.rs.client.Invocation
-
getClientInvoker
-
setClientInvoker
-
filterRequest
-
filterResponse
protected ClientResponse filterResponse(ClientRequestContextImpl requestContext, ClientResponse response) -
getTracingLogger
-
setActualTarget
public void setActualTarget(jakarta.ws.rs.client.WebTarget target) -
getActualTarget
public jakarta.ws.rs.client.WebTarget getActualTarget()
-