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
FieldsModifier and TypeFieldDescriptionprotected jakarta.ws.rs.client.WebTargetprotected booleanprotected ResteasyClientprotected ClientInvokerprotected ClientConfigurationprotected DelegatingOutputStreamprotected Objectprotected Annotation[]protected Class<?> protected Typeprotected OutputStreamprotected ClientRequestHeadersprotected Stringprotected RESTEasyTracingLoggerprotected URI -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClientInvocation(ClientInvocation clientInvocation) ClientInvocation(ResteasyClient client, URI uri, ClientRequestHeaders headers, ClientConfiguration parent) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TextractResult(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 ClientResponsefilterRequest(ClientRequestContextImpl requestContext) protected ClientResponsefilterResponse(ClientRequestContextImpl requestContext, ClientResponse response) jakarta.ws.rs.client.WebTargetjakarta.ws.rs.core.ConfigurationClass<?> 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> ThandleErrorStatus(jakarta.ws.rs.core.Response response) Throw an exception.invoke()<T> Tinvoke(jakarta.ws.rs.core.GenericType<T> responseType) <T> Tbooleanjakarta.ws.rs.client.InvocationOptional<org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.ReactiveInvocation> reactive()If the client's HTTP engine implementsReactiveClientHttpEnginethen you can access the latter'sPublishervia this method.voidsetActualTarget(jakarta.ws.rs.client.WebTarget target) voidsetChunked(boolean chunked) voidsetClientInvoker(ClientInvoker clientInvoker) voidsetDelegatingOutputStream(DelegatingOutputStream delegatingOutputStream) voidsetEntity(jakarta.ws.rs.client.Entity<?> entity) voidsetEntityAnnotations(Annotation[] entityAnnotations) voidsetEntityObject(Object ent) voidsetEntityStream(OutputStream entityStream) voidsetHeaders(ClientRequestHeaders headers) voidvoidFuture<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> voidwriteRequestBody(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:
invokein interfacejakarta.ws.rs.client.Invocation
-
invoke
- Specified by:
invokein interfacejakarta.ws.rs.client.Invocation
-
invoke
public <T> T invoke(jakarta.ws.rs.core.GenericType<T> responseType) - Specified by:
invokein interfacejakarta.ws.rs.client.Invocation
-
submit
- Specified by:
submitin interfacejakarta.ws.rs.client.Invocation
-
submit
-
submit
- Specified by:
submitin interfacejakarta.ws.rs.client.Invocation
-
submit
- Specified by:
submitin 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 implementsReactiveClientHttpEnginethen you can access the latter'sPublishervia this method. -
property
-
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()
-