Class RequestProperties
- java.lang.Object
-
- io.servicetalk.http.router.jersey.internal.RequestProperties
-
public final class RequestProperties extends java.lang.Object
Helper methods used internally for accessing ServiceTalk-specific request properties.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferPublisherInputStream
getRequestBufferPublisherInputStream(javax.ws.rs.container.ContainerRequestContext reqCtx)
Get theBufferPublisherInputStream
associated with the request.static Cancellable
getRequestCancellable(javax.ws.rs.container.ContainerRequestContext reqCtx)
Get the requestCancellable
.static Publisher<Buffer>
getResponseBufferPublisher(javax.ws.rs.container.ContainerRequestContext reqCtx)
Get the responsePublisher<Buffer>
.static HttpExecutionStrategy
getResponseExecutionStrategy(javax.ws.rs.container.ContainerRequestContext reqCtx)
Get the responseHttpExecutionStrategy
used for offloading.static void
initRequestProperties(BufferPublisherInputStream entityStream, javax.ws.rs.container.ContainerRequestContext reqCtx)
Initialize all request properties.static void
setRequestCancellable(Cancellable cancellable, javax.ws.rs.container.ContainerRequestContext reqCtx)
Set the requestCancellable
.static void
setResponseBufferPublisher(Publisher<Buffer> bufferPublisher, javax.ws.rs.container.ContainerRequestContext reqCtx)
Set the responsePublisher<Buffer>
.static void
setResponseExecutionStrategy(HttpExecutionStrategy executor, javax.ws.rs.container.ContainerRequestContext reqCtx)
Set the responseHttpExecutionStrategy
used for offloading.
-
-
-
Method Detail
-
initRequestProperties
public static void initRequestProperties(BufferPublisherInputStream entityStream, javax.ws.rs.container.ContainerRequestContext reqCtx)
Initialize all request properties.- Parameters:
entityStream
- theBufferPublisherInputStream
associated with the request.reqCtx
- theContainerRequestContext
for the request
-
getRequestBufferPublisherInputStream
public static BufferPublisherInputStream getRequestBufferPublisherInputStream(javax.ws.rs.container.ContainerRequestContext reqCtx)
Get theBufferPublisherInputStream
associated with the request.- Parameters:
reqCtx
- theContainerRequestContext
for the request- Returns:
- the
BufferPublisherInputStream
associated with the request
-
getRequestCancellable
public static Cancellable getRequestCancellable(javax.ws.rs.container.ContainerRequestContext reqCtx)
Get the requestCancellable
.- Parameters:
reqCtx
- theContainerRequestContext
for the request- Returns:
- the request
Cancellable
.
-
setRequestCancellable
public static void setRequestCancellable(Cancellable cancellable, javax.ws.rs.container.ContainerRequestContext reqCtx)
Set the requestCancellable
.- Parameters:
cancellable
- requestCancellable
.reqCtx
- theContainerRequestContext
for the request
-
getResponseBufferPublisher
@Nullable public static Publisher<Buffer> getResponseBufferPublisher(javax.ws.rs.container.ContainerRequestContext reqCtx)
Get the responsePublisher<Buffer>
.- Parameters:
reqCtx
- theContainerRequestContext
for the request- Returns:
- the response
Publisher<Buffer>
ornull
if none has been set.
-
setResponseBufferPublisher
public static void setResponseBufferPublisher(Publisher<Buffer> bufferPublisher, javax.ws.rs.container.ContainerRequestContext reqCtx)
Set the responsePublisher<Buffer>
.- Parameters:
bufferPublisher
- the response contentPublisher<Buffer>
reqCtx
- theContainerRequestContext
for the request
-
getResponseExecutionStrategy
@Nullable public static HttpExecutionStrategy getResponseExecutionStrategy(javax.ws.rs.container.ContainerRequestContext reqCtx)
Get the responseHttpExecutionStrategy
used for offloading.- Parameters:
reqCtx
- theContainerRequestContext
for the request- Returns:
- the response
HttpExecutionStrategy
-
setResponseExecutionStrategy
public static void setResponseExecutionStrategy(HttpExecutionStrategy executor, javax.ws.rs.container.ContainerRequestContext reqCtx)
Set the responseHttpExecutionStrategy
used for offloading.- Parameters:
executor
- the responseHttpExecutionStrategy
reqCtx
- theContainerRequestContext
for the request
-
-