Class RequestProperties

java.lang.Object
io.servicetalk.http.router.jersey.internal.RequestProperties

public final class RequestProperties extends Object
Helper methods used internally for accessing ServiceTalk-specific request properties.
  • Method Details

    • initRequestProperties

      public static void initRequestProperties(BufferPublisherInputStream entityStream, javax.ws.rs.container.ContainerRequestContext reqCtx)
      Initialize all request properties.
      Parameters:
      entityStream - the BufferPublisherInputStream associated with the request.
      reqCtx - the ContainerRequestContext for the request
    • getRequestBufferPublisherInputStream

      public static BufferPublisherInputStream getRequestBufferPublisherInputStream(javax.ws.rs.container.ContainerRequestContext reqCtx)
      Get the BufferPublisherInputStream associated with the request.
      Parameters:
      reqCtx - the ContainerRequestContext for the request
      Returns:
      the BufferPublisherInputStream associated with the request
    • getRequestCancellable

      public static Cancellable getRequestCancellable(javax.ws.rs.container.ContainerRequestContext reqCtx)
      Get the request Cancellable.
      Parameters:
      reqCtx - the ContainerRequestContext for the request
      Returns:
      the request Cancellable.
    • setRequestCancellable

      public static void setRequestCancellable(Cancellable cancellable, javax.ws.rs.container.ContainerRequestContext reqCtx)
      Set the request Cancellable.
      Parameters:
      cancellable - request Cancellable.
      reqCtx - the ContainerRequestContext for the request
    • getResponseBufferPublisher

      @Nullable public static Publisher<Buffer> getResponseBufferPublisher(javax.ws.rs.container.ContainerRequestContext reqCtx)
      Get the response Publisher<Buffer>.
      Parameters:
      reqCtx - the ContainerRequestContext for the request
      Returns:
      the response Publisher<Buffer> or null if none has been set.
    • setResponseBufferPublisher

      public static void setResponseBufferPublisher(Publisher<Buffer> bufferPublisher, javax.ws.rs.container.ContainerRequestContext reqCtx)
      Set the response Publisher<Buffer>.
      Parameters:
      bufferPublisher - the response content Publisher<Buffer>
      reqCtx - the ContainerRequestContext for the request
    • getResponseExecutionStrategy

      @Nullable public static HttpExecutionStrategy getResponseExecutionStrategy(javax.ws.rs.container.ContainerRequestContext reqCtx)
      Get the response HttpExecutionStrategy used for offloading.
      Parameters:
      reqCtx - the ContainerRequestContext for the request
      Returns:
      the response HttpExecutionStrategy
    • setResponseExecutionStrategy

      public static void setResponseExecutionStrategy(HttpExecutionStrategy executor, javax.ws.rs.container.ContainerRequestContext reqCtx)
      Set the response HttpExecutionStrategy used for offloading.
      Parameters:
      executor - the response HttpExecutionStrategy
      reqCtx - the ContainerRequestContext for the request