Class RestClientRequestContext

java.lang.Object
org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
org.jboss.resteasy.reactive.client.impl.RestClientRequestContext
All Implemented Interfaces:
Closeable, AutoCloseable, Runnable, org.jboss.resteasy.reactive.common.core.ResteasyReactiveCallbackContext

public class RestClientRequestContext extends org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
This is a stateful invocation, you can't invoke it twice.
  • Field Details

  • Constructor Details

    • RestClientRequestContext

      public RestClientRequestContext(ClientImpl restClient, io.vertx.core.http.HttpClient httpClient, String httpMethod, URI uri, org.jboss.resteasy.reactive.common.jaxrs.ConfigurationImpl configuration, ClientRequestHeaders requestHeaders, jakarta.ws.rs.client.Entity<?> entity, jakarta.ws.rs.core.GenericType<?> responseType, boolean registerBodyHandler, Map<String,Object> properties, ClientRestHandler[] handlerChain, ClientRestHandler[] abortHandlerChain, ClientRestHandler[] abortHandlerChainWithoutResponseFilters, org.jboss.resteasy.reactive.spi.ThreadSetupAction requestContext)
  • Method Details

    • abort

      public void abort()
    • getInvokedMethod

      public Method getInvokedMethod()
    • invokedMethodReturnsAsyncType

      public boolean invokedMethodReturnsAsyncType()
    • getMethodDeclaredAnnotationsSafe

      public Annotation[] getMethodDeclaredAnnotationsSafe()
    • unwrapException

      protected Throwable unwrapException(Throwable t)
      Overrides:
      unwrapException in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
    • readEntity

      public <T> T readEntity(InputStream in, jakarta.ws.rs.core.GenericType<T> responseType, jakarta.ws.rs.core.MediaType mediaType, Annotation[] annotations, jakarta.ws.rs.core.MultivaluedMap<String,Object> metadata) throws IOException
      Throws:
      IOException
    • getReaderInterceptors

      public jakarta.ws.rs.ext.ReaderInterceptor[] getReaderInterceptors()
    • getProperties

      public Map<String,Object> getProperties()
    • initialiseResponse

      public void initialiseResponse(io.vertx.core.http.HttpClientResponse vertxResponse)
    • getHttpClient

      public io.vertx.core.http.HttpClient getHttpClient()
    • getClientRequestContext

      public ClientRequestContextImpl getClientRequestContext()
    • getOrCreateClientResponseContext

      public ClientResponseContextImpl getOrCreateClientResponseContext()
    • getOrCreateClientRequestContext

      public ClientRequestContextImpl getOrCreateClientRequestContext()
    • writeEntity

      public io.vertx.core.buffer.Buffer writeEntity(jakarta.ws.rs.client.Entity<?> entity, jakarta.ws.rs.core.MultivaluedMap<String,String> headerMap, jakarta.ws.rs.ext.WriterInterceptor[] interceptors) throws IOException
      Throws:
      IOException
    • setEntity

      public void setEntity(Object entity, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType)
    • getResult

      public CompletableFuture<org.jboss.resteasy.reactive.common.jaxrs.ResponseImpl> getResult()
    • getVertxClientResponse

      public io.vertx.core.http.HttpClientResponse getVertxClientResponse()
    • getEventLoop

      protected Executor getEventLoop()
      Specified by:
      getEventLoop in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
    • getHttpClientRequest

      public io.vertx.core.http.HttpClientRequest getHttpClientRequest()
    • setHttpClientRequest

      public RestClientRequestContext setHttpClientRequest(io.vertx.core.http.HttpClientRequest httpClientRequest)
    • handleRequestScopeActivation

      protected void handleRequestScopeActivation()
      Specified by:
      handleRequestScopeActivation in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
    • restarted

      protected void restarted(boolean keepTarget)
      Specified by:
      restarted in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
    • handleUnrecoverableError

      protected void handleUnrecoverableError(Throwable throwable)
      Specified by:
      handleUnrecoverableError in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
    • getConfiguration

      public org.jboss.resteasy.reactive.common.jaxrs.ConfigurationImpl getConfiguration()
    • getRestClient

      public ClientImpl getRestClient()
    • getResponseStatus

      public int getResponseStatus()
    • setResponseStatus

      public RestClientRequestContext setResponseStatus(int responseStatus)
    • getResponseReasonPhrase

      public String getResponseReasonPhrase()
    • setResponseReasonPhrase

      public RestClientRequestContext setResponseReasonPhrase(String responseReasonPhrase)
    • getResponseHeaders

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getResponseHeaders()
    • setResponseHeaders

      public RestClientRequestContext setResponseHeaders(jakarta.ws.rs.core.MultivaluedMap<String,String> responseHeaders)
    • isCheckSuccessfulFamily

      public boolean isCheckSuccessfulFamily()
    • isResponseTypeSpecified

      public boolean isResponseTypeSpecified()
    • setResponseTypeSpecified

      public RestClientRequestContext setResponseTypeSpecified(boolean responseTypeSpecified)
    • getResponseType

      public jakarta.ws.rs.core.GenericType<?> getResponseType()
    • setResponseType

      public RestClientRequestContext setResponseType(jakarta.ws.rs.core.GenericType<?> responseType)
    • getRequestHeaders

      public ClientRequestHeaders getRequestHeaders()
    • getRequestHeadersAsMap

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getRequestHeadersAsMap()
    • getHttpMethod

      public String getHttpMethod()
    • setHttpMethod

      public RestClientRequestContext setHttpMethod(String httpMethod)
    • getUri

      public URI getUri()
    • setUri

      public RestClientRequestContext setUri(URI uri)
    • getEntity

      public jakarta.ws.rs.client.Entity<?> getEntity()
    • setEntity

      public RestClientRequestContext setEntity(jakarta.ws.rs.client.Entity<?> entity)
    • isRegisterBodyHandler

      public boolean isRegisterBodyHandler()
    • getResponseEntityStream

      public InputStream getResponseEntityStream()
    • setResponseEntityStream

      public RestClientRequestContext setResponseEntityStream(InputStream responseEntityStream)
    • setResponseMultipartParts

      public RestClientRequestContext setResponseMultipartParts(List<io.netty.handler.codec.http.multipart.InterfaceHttpData> responseMultiParts)
    • getResponseMultipartParts

      public List<io.netty.handler.codec.http.multipart.InterfaceHttpData> getResponseMultipartParts()
    • isAborted

      public boolean isAborted()
    • getAbortedWith

      public jakarta.ws.rs.core.Response getAbortedWith()
    • setAbortedWith

      public RestClientRequestContext setAbortedWith(jakarta.ws.rs.core.Response abortedWith)
    • isFileUpload

      public boolean isFileUpload()
    • isInputStreamUpload

      public boolean isInputStreamUpload()
    • isMultiBufferUpload

      public boolean isMultiBufferUpload()
    • isMultipart

      public boolean isMultipart()
    • isFileDownload

      public boolean isFileDownload()
    • isInputStreamDownload

      public boolean isInputStreamDownload()
    • isJakartaResponseDownload

      public boolean isJakartaResponseDownload()
    • getTmpFilePath

      public String getTmpFilePath()
    • setTmpFilePath

      public void setTmpFilePath(String tmpFilePath)
    • clearTmpFilePath

      public void clearTmpFilePath()
    • getClientFilterProperties

      public Map<String,Object> getClientFilterProperties()
    • getAbortHandlerChainWithoutResponseFilters

      public ClientRestHandler[] getAbortHandlerChainWithoutResponseFilters()
    • setCallStatsCollector

      public void setCallStatsCollector(io.smallrye.stork.api.ServiceInstance serviceInstance)
    • getCallStatsCollector

      public io.smallrye.stork.api.ServiceInstance getCallStatsCollector()
    • getMultipartResponsesData

      public Map<Class<?>,MultipartResponseData> getMultipartResponsesData()
    • setMultipartResponsesData

      public void setMultipartResponsesData(Map<Class<?>,MultipartResponseData> multipartResponsesData)
    • getCallerStackTrace

      public StackTraceElement[] getCallerStackTrace()
    • setCallerStackTrace

      public void setCallerStackTrace(StackTraceElement[] callerStackTrace)
    • isRequestScopeManagementRequired

      protected boolean isRequestScopeManagementRequired()
      Overrides:
      isRequestScopeManagementRequired in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<RestClientRequestContext,ClientRestHandler>
    • setUserCanceled

      public void setUserCanceled()
    • isUserCanceled

      public boolean isUserCanceled()