Class ServletRequestContext

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
io.quarkus.resteasy.reactive.server.servlet.runtime.ServletRequestContext
All Implemented Interfaces:
io.undertow.server.ResponseCommitListener, 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 ServletRequestContext extends org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext implements org.jboss.resteasy.reactive.server.spi.ServerHttpRequest, org.jboss.resteasy.reactive.server.spi.ServerHttpResponse, io.undertow.server.ResponseCommitListener
  • Field Details

    • context

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

      final jakarta.servlet.http.HttpServletRequest request
    • response

      final jakarta.servlet.http.HttpServletResponse response
    • asyncContext

      jakarta.servlet.AsyncContext asyncContext
    • writeListener

    • readListener

    • asyncWriteData

      byte[] asyncWriteData
    • closed

      boolean closed
    • asyncWriteHandler

      Consumer<Throwable> asyncWriteHandler
    • preCommitTask

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

    • ServletRequestContext

      public ServletRequestContext(org.jboss.resteasy.reactive.server.core.Deployment deployment, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.jboss.resteasy.reactive.spi.ThreadSetupAction requestContext, org.jboss.resteasy.reactive.server.spi.ServerRestHandler[] handlerChain, org.jboss.resteasy.reactive.server.spi.ServerRestHandler[] abortHandlerChain, io.vertx.ext.web.RoutingContext context, io.undertow.server.HttpServerExchange exchange)
  • Method Details

    • isRequestScopeManagementRequired

      protected boolean isRequestScopeManagementRequired()
      Overrides:
      isRequestScopeManagementRequired in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext,org.jboss.resteasy.reactive.server.spi.ServerRestHandler>
    • beginAsyncProcessing

      protected void beginAsyncProcessing()
      Overrides:
      beginAsyncProcessing in class org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext<org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext,org.jboss.resteasy.reactive.server.spi.ServerRestHandler>
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • addCloseHandler

      public org.jboss.resteasy.reactive.server.spi.ServerHttpResponse addCloseHandler(Runnable onClose)
      Specified by:
      addCloseHandler in interface org.jboss.resteasy.reactive.server.spi.ServerHttpResponse
    • 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
    • handleRequestScopeActivation

      protected void handleRequestScopeActivation()
      Overrides:
      handleRequestScopeActivation in class org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext
    • fireSecurityIdentity

      static void fireSecurityIdentity(io.quarkus.security.identity.SecurityIdentity identity)
    • clear

      static void clear()
    • createSecurityContext

      protected jakarta.ws.rs.core.SecurityContext createSecurityContext()
      Overrides:
      createSecurityContext 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
    • 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
    • getRequestHost

      public String getRequestHost()
      Specified by:
      getRequestHost 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
    • 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
    • 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
    • isOnIoThread

      public boolean isOnIoThread()
      Specified by:
      isOnIoThread in interface org.jboss.resteasy.reactive.server.spi.ServerHttpRequest
    • 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(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
    • 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
    • beforeCommit

      public void beforeCommit(io.undertow.server.HttpServerExchange exchange)
      Specified by:
      beforeCommit in interface io.undertow.server.ResponseCommitListener
    • 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
    • isWriteQueueFull

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

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