Class VertxResteasyReactiveRequestContext

java.lang.Object
org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext,org.jboss.resteasy.reactive.server.spi.ServerRestHandler>
org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
org.jboss.resteasy.reactive.server.vertx.VertxResteasyReactiveRequestContext
All Implemented Interfaces:
io.vertx.core.Handler<Void>, Closeable, AutoCloseable, Runnable, org.jboss.resteasy.reactive.common.core.ResteasyReactiveCallbackContext, org.jboss.resteasy.reactive.server.injection.ResteasyReactiveInjectionContext, org.jboss.resteasy.reactive.server.spi.ServerHttpRequest, org.jboss.resteasy.reactive.server.spi.ServerHttpResponse, org.jboss.resteasy.reactive.server.spi.ServerRequestContext, org.jboss.resteasy.reactive.server.spi.StreamingResponse<org.jboss.resteasy.reactive.server.spi.ServerHttpResponse>

public class VertxResteasyReactiveRequestContext extends org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext implements org.jboss.resteasy.reactive.server.spi.ServerHttpRequest, org.jboss.resteasy.reactive.server.spi.ServerHttpResponse, io.vertx.core.Handler<Void>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest

    org.jboss.resteasy.reactive.server.spi.ServerHttpRequest.ReadCallback
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final io.vertx.ext.web.RoutingContext
     
    static final String
     
    protected Consumer<org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext>
     
    protected final io.vertx.core.http.HttpServerRequest
     
    protected final io.vertx.core.http.HttpServerResponse
     

    Fields inherited from class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext

    deployment, EMPTY_ARRAY

    Fields inherited from class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext

    abortHandlerChain, CUSTOM_RR_PROPERTIES_PREFIX, handlers, log, logWebApplicationExceptions, position, throwable
  • Constructor Summary

    Constructors
    Constructor
    Description
    VertxResteasyReactiveRequestContext(org.jboss.resteasy.reactive.server.core.Deployment deployment, io.vertx.ext.web.RoutingContext context, org.jboss.resteasy.reactive.spi.ThreadSetupAction requestContext, org.jboss.resteasy.reactive.server.spi.ServerRestHandler[] handlerChain, org.jboss.resteasy.reactive.server.spi.ServerRestHandler[] abortHandlerChain, ClassLoader devModeTccl)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
     
    void
     
    boolean
     
    boolean
     
     
     
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    end()
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    end(byte[] data)
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    end(io.vertx.core.buffer.Buffer data)
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    end(String data)
     
     
     
     
     
    io.vertx.ext.web.RoutingContext
     
     
    protected io.netty.channel.EventLoop
     
    org.jboss.resteasy.reactive.server.core.multipart.FormData
     
     
    Retrieves the parameters from the current HTTP request as a Map<String,List<String>>, where the keys are parameter names and the values are lists of parameter values.
     
     
     
     
     
     
     
     
    void
    handle(Void event)
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
     
     
     
    registerTimer(long millis, Runnable task)
     
    void
     
    void
     
    boolean
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    sendFile(String path, long offset, long length)
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    setChunked(boolean chunked)
     
    void
    setPreCommitListener(Consumer<org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext> task)
     
    protected void
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    setReadListener(org.jboss.resteasy.reactive.server.spi.ServerHttpRequest.ReadCallback callback)
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    setStatusCode(int code)
     
    <T> T
    unwrap(Class<T> theType)
     
    io.vertx.core.http.HttpServerRequest
     
    io.vertx.core.http.HttpServerResponse
     
    write(byte[] data)
     
    org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    write(byte[] data, Consumer<Throwable> asyncResultHandler)
     

    Methods inherited from class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext

    abortWith, close, createSecurityContext, endResponse, getAbsoluteURI, getAdditionalAnnotations, getAllAnnotations, getAllPathParameters, getAsyncResponse, getAuthority, getBeanParameter, getContainerRequestContext, getContainerResponseContext, getContextParameter, getCookieParameter, getDeployment, getEndpointInstance, getEntityWriter, getFormData, getFormParameter, getGenericReturnType, getHeader, getHttpHeaders, getInputStream, getMatchedURIs, getMatrixParameter, getMethod, getMethodAnnotations, getOrCreateOutputStream, getOutputStream, getParameters, getPath, getPathParam, getPathParameter, getPathSegments, getPathWithoutPrefix, getProviders, getQueryParameter, getQueryParameter, getReaderInterceptors, getRemaining, getRequest, getRequestEntity, getRequestHeaders, getResourceLocatorPathParam, getResponse, getResponseContentType, getResponseEntity, getResponseMediaType, getResteasyReactiveResourceInfo, getResult, getScheme, getSecurityContext, getSseEventSink, getTarget, getThrowable, getUriInfo, getWriterInterceptors, handleRequestScopeActivation, handlesUnmappedException, handleUnmappedException, handleUnrecoverableError, hasGenericReturnType, hasInputStream, initPathSegments, isProducesChecked, isSecurityContextSet, mapExceptionIfPresent, requestScopeDeactivated, resetBuildTimeSerialization, restart, restart, restarted, restartWithNextInitialMatch, saveUriMatchState, securityContextUpdated, setAdditionalAnnotations, setAllAnnotations, setAsyncResponse, setEndpointInstance, setEntityWriter, setFormData, setGenericReturnType, setInputStream, setMaxPathParams, setMethod, setMethodAnnotations, setOutputStream, setPathParamValue, setProducesChecked, setReaderInterceptors, setRemaining, setRequestEntity, setRequestUri, setResponse, setResponseContentType, setResponseContentType, setResult, setSecurityContext, setSseEventSink, setupInitialMatchAndRestart, setUriInfo, setWriterInterceptors

    Methods inherited from class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext

    beginAsyncProcessing, captureCDIRequestScope, getAbortHandlerChain, getHandlers, getPosition, getProperty, getPropertyNames, handleException, handleException, invokeHandler, isRequestScopeManagementRequired, isSuspended, onPreRequestScopeActivation, registerCompletionCallback, registerConnectionCallback, removeProperty, requireCDIRequestScope, restart, restart, resume, resume, resume, resume, run, setAbortHandlerChain, setAbortHandlerChainStarted, setPosition, setProperty, setSuspended, suspend, unwrapException

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.jboss.resteasy.reactive.common.core.ResteasyReactiveCallbackContext

    registerCompletionCallback, registerConnectionCallback

    Methods inherited from interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest

    getForwardedInfo, getRequestHost
  • Field Details

    • CONTINUE

      public static final String CONTINUE
      See Also:
    • context

      protected final io.vertx.ext.web.RoutingContext context
    • request

      protected final io.vertx.core.http.HttpServerRequest request
    • response

      protected final io.vertx.core.http.HttpServerResponse response
    • preCommitTask

      protected Consumer<org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext> preCommitTask
  • Constructor Details

    • VertxResteasyReactiveRequestContext

      public VertxResteasyReactiveRequestContext(org.jboss.resteasy.reactive.server.core.Deployment deployment, io.vertx.ext.web.RoutingContext context, org.jboss.resteasy.reactive.spi.ThreadSetupAction requestContext, org.jboss.resteasy.reactive.server.spi.ServerRestHandler[] handlerChain, org.jboss.resteasy.reactive.server.spi.ServerRestHandler[] abortHandlerChain, ClassLoader devModeTccl)
  • Method Details

    • addCloseHandler

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse addCloseHandler(Runnable onClose)
      Specified by:
      addCloseHandler in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • getContext

      public io.vertx.ext.web.RoutingContext getContext()
    • serverRequest

      public org.jboss.resteasy.reactive.server.spi.ServerHttpRequest serverRequest()
      Specified by:
      serverRequest in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • serverResponse

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse serverResponse()
      Specified by:
      serverResponse in interface org.jboss.resteasy.reactive.server.spi.ServerRequestContext
      Specified by:
      serverResponse in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • setQueryParamsFrom

      protected void setQueryParamsFrom(String uri)
      Overrides:
      setQueryParamsFrom in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • getEventLoop

      protected io.netty.channel.EventLoop getEventLoop()
      Specified by:
      getEventLoop in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • getContextExecutor

      public Executor getContextExecutor()
      Overrides:
      getContextExecutor in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext,org.jboss.resteasy.reactive.server.spi.ServerRestHandler>
    • registerTimer

      public Runnable registerTimer(long millis, Runnable task)
      Specified by:
      registerTimer in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • resumeExternalProcessing

      public boolean resumeExternalProcessing()
      Specified by:
      resumeExternalProcessing in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • getRequestHeader

      public String getRequestHeader(CharSequence name)
      Specified by:
      getRequestHeader in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getAllRequestHeaders

      public Iterable<Map.Entry<String,String>> getAllRequestHeaders()
      Specified by:
      getAllRequestHeaders in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getAllRequestHeaders

      public List<String> getAllRequestHeaders(String name)
      Specified by:
      getAllRequestHeaders in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • containsRequestHeader

      public boolean containsRequestHeader(CharSequence accept)
      Specified by:
      containsRequestHeader in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getRequestPath

      public String getRequestPath()
      Specified by:
      getRequestPath in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getRequestMethod

      public String getRequestMethod()
      Specified by:
      getRequestMethod in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getRequestNormalisedPath

      public String getRequestNormalisedPath()
      Specified by:
      getRequestNormalisedPath in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getRequestAbsoluteUri

      public String getRequestAbsoluteUri()
      Specified by:
      getRequestAbsoluteUri in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getRequestScheme

      public String getRequestScheme()
      Specified by:
      getRequestScheme in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getRequestHostAndPort

      public String getRequestHostAndPort()
      Specified by:
      getRequestHostAndPort in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • closeConnection

      public void closeConnection()
      Specified by:
      closeConnection in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getQueryParam

      public String getQueryParam(String name)
      Specified by:
      getQueryParam in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getAllQueryParams

      public List<String> getAllQueryParams(String name)
      Specified by:
      getAllQueryParams in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getQueryParamsMap

      public Map<String,List<String>> getQueryParamsMap()
      Retrieves the parameters from the current HTTP request as a Map<String,List<String>>, where the keys are parameter names and the values are lists of parameter values. This allows parameters to be extracted from the URL without knowing their names in advance. The method is used by ParameterExtractor, which works with characteristics such as parameter name, single/multiple values, and encoding. Since it's not always possible to distinguish between Map and
      invalid reference
      Multimap
      , the method returns a unified Map<String,List<String>> for handling both cases downstream by ParameterHandler.
      Specified by:
      getQueryParamsMap in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
      Returns:
      a Map<String,List<String>> containing the parameters and their corresponding values.
    • query

      public String query()
      Specified by:
      query in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • queryParamNames

      public Collection<String> queryParamNames()
      Specified by:
      queryParamNames in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • isRequestEnded

      public boolean isRequestEnded()
      Specified by:
      isRequestEnded in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • createInputStream

      public InputStream createInputStream(ByteBuffer existingData)
      Specified by:
      createInputStream in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • createInputStream

      public InputStream createInputStream()
      Specified by:
      createInputStream in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • pauseRequestInput

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse pauseRequestInput()
      Specified by:
      pauseRequestInput in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • resumeRequestInput

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse resumeRequestInput()
      Specified by:
      resumeRequestInput in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • setReadListener

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse setReadListener(org.jboss.resteasy.reactive.server.spi.ServerHttpRequest.ReadCallback callback)
      Specified by:
      setReadListener in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • getExistingParsedForm

      public org.jboss.resteasy.reactive.server.core.multipart.FormData getExistingParsedForm()
      Specified by:
      getExistingParsedForm in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • isOnIoThread

      public boolean isOnIoThread()
      Specified by:
      isOnIoThread in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • unwrap

      public <T> T unwrap(Class<T> theType)
      Specified by:
      unwrap in interface org.jboss.resteasy.reactive.server.injection.ResteasyReactiveInjectionContext
      Specified by:
      unwrap in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
      Overrides:
      unwrap in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • setStatusCode

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse setStatusCode(int code)
      Specified by:
      setStatusCode in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
      Specified by:
      setStatusCode in interface org.jboss.resteasy.reactive.server.spi.StreamingResponse<org.jboss.resteasy.reactive.server.spi.ServerHttpResponse>
    • end

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse end()
      Specified by:
      end in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • headWritten

      public boolean headWritten()
      Specified by:
      headWritten in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • end

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse end(io.vertx.core.buffer.Buffer data)
    • end

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse end(byte[] data)
      Specified by:
      end in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • end

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse end(String data)
      Specified by:
      end in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • addResponseHeader

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse addResponseHeader(CharSequence name, CharSequence value)
      Specified by:
      addResponseHeader in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • setResponseHeader

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse setResponseHeader(CharSequence name, CharSequence value)
      Specified by:
      setResponseHeader in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
      Specified by:
      setResponseHeader in interface org.jboss.resteasy.reactive.server.spi.StreamingResponse<org.jboss.resteasy.reactive.server.spi.ServerHttpResponse>
    • setResponseHeader

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse setResponseHeader(CharSequence name, Iterable<CharSequence> values)
      Specified by:
      setResponseHeader in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
      Specified by:
      setResponseHeader in interface org.jboss.resteasy.reactive.server.spi.StreamingResponse<org.jboss.resteasy.reactive.server.spi.ServerHttpResponse>
    • getAllResponseHeaders

      public Iterable<Map.Entry<String,String>> getAllResponseHeaders()
      Specified by:
      getAllResponseHeaders in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • getResponseHeader

      public String getResponseHeader(String name)
      Specified by:
      getResponseHeader in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • removeResponseHeader

      public void removeResponseHeader(String name)
      Specified by:
      removeResponseHeader in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • closed

      public boolean closed()
      Specified by:
      closed in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • setChunked

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse setChunked(boolean chunked)
      Specified by:
      setChunked in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • write

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse write(byte[] data, Consumer<Throwable> asyncResultHandler)
      Specified by:
      write in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • write

      public CompletionStage<Void> write(byte[] data)
      Specified by:
      write in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • sendFile

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse sendFile(String path, long offset, long length)
      Specified by:
      sendFile in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • createResponseOutputStream

      public OutputStream createResponseOutputStream()
      Specified by:
      createResponseOutputStream in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • setPreCommitListener

      public void setPreCommitListener(Consumer<org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext> task)
      Specified by:
      setPreCommitListener in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • handle

      public void handle(Void event)
      Specified by:
      handle in interface io.vertx.core.Handler<Void>
    • addDrainHandler

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse addDrainHandler(Runnable onDrain)
      Specified by:
      addDrainHandler in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • reset

      public void reset()
      Specified by:
      reset in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • isWriteQueueFull

      public boolean isWriteQueueFull()
      Specified by:
      isWriteQueueFull in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • vertxServerRequest

      public io.vertx.core.http.HttpServerRequest vertxServerRequest()
    • vertxServerResponse

      public io.vertx.core.http.HttpServerResponse vertxServerResponse()