public final class HttpJerseyRouterBuilder
extends java.lang.Object
StreamingHttpService
which routes requests to JAX-RS annotated classes,
using Jersey as the routing engine, eg.
final StreamingHttpService router = new HttpJerseyRouterBuilder()
.buildStreaming(application);
Constructor and Description |
---|
HttpJerseyRouterBuilder() |
Modifier and Type | Method and Description |
---|---|
HttpJerseyRouterBuilder |
baseUriFunction(java.util.function.BiFunction<ConnectionContext,HttpRequestMetaData,java.lang.String> baseUriFunction)
Set the function used to compute the base URI for the incoming HTTP request.
|
HttpService |
build(javax.ws.rs.core.Application application)
Build the
HttpService for the specified JAX-RS Application . |
HttpService |
build(java.lang.Class<? extends javax.ws.rs.core.Application> applicationClass)
Build the
HttpService for the specified JAX-RS Application class. |
BlockingHttpService |
buildBlocking(javax.ws.rs.core.Application application)
Build the
BlockingHttpService for the specified JAX-RS Application . |
BlockingHttpService |
buildBlocking(java.lang.Class<? extends javax.ws.rs.core.Application> applicationClass)
Build the
BlockingHttpService for the specified JAX-RS Application class. |
BlockingStreamingHttpService |
buildBlockingStreaming(javax.ws.rs.core.Application application)
Build the
BlockingStreamingHttpService for the specified JAX-RS Application . |
BlockingStreamingHttpService |
buildBlockingStreaming(java.lang.Class<? extends javax.ws.rs.core.Application> applicationClass)
Build the
BlockingStreamingHttpService for the specified JAX-RS Application class. |
StreamingHttpService |
buildStreaming(javax.ws.rs.core.Application application)
Build the
StreamingHttpService for the specified JAX-RS Application . |
StreamingHttpService |
buildStreaming(java.lang.Class<? extends javax.ws.rs.core.Application> applicationClass)
Build the
StreamingHttpService for the specified JAX-RS Application class. |
HttpJerseyRouterBuilder |
publisherInputStreamQueueCapacity(int publisherInputStreamQueueCapacity)
Set the hint for the capacity of the intermediary queue that stores items when adapting
Publisher s
into InputStream s. |
HttpJerseyRouterBuilder |
routeExecutionStrategyFactory(RouteExecutionStrategyFactory<HttpExecutionStrategy> strategyFactory)
Set a
RouteExecutionStrategyFactory<HttpExecutionStrategy> for
creating HttpExecutionStrategy instances that can be used for offloading the handling of request to
resource methods, as specified via RouteExecutionStrategy annotations. |
public HttpJerseyRouterBuilder publisherInputStreamQueueCapacity(int publisherInputStreamQueueCapacity)
Publisher
s
into InputStream
s.publisherInputStreamQueueCapacity
- the capacity hint.public HttpJerseyRouterBuilder baseUriFunction(java.util.function.BiFunction<ConnectionContext,HttpRequestMetaData,java.lang.String> baseUriFunction)
/
as path, and no query nor fragment.baseUriFunction
- a BiFunction
that computes a base URI String
for the provided ConnectionContext
and HttpRequestMetaData
.public HttpJerseyRouterBuilder routeExecutionStrategyFactory(RouteExecutionStrategyFactory<HttpExecutionStrategy> strategyFactory)
RouteExecutionStrategyFactory<HttpExecutionStrategy>
for
creating HttpExecutionStrategy
instances that can be used for offloading the handling of request to
resource methods, as specified via RouteExecutionStrategy
annotations.strategyFactory
- a
RouteExecutionStrategyFactory<HttpExecutionStrategy>
RouteExecutionStrategy
public HttpService build(javax.ws.rs.core.Application application)
HttpService
for the specified JAX-RS Application
.application
- the Application
to route requests to.HttpService
.public HttpService build(java.lang.Class<? extends javax.ws.rs.core.Application> applicationClass)
HttpService
for the specified JAX-RS Application
class.applicationClass
- the Application
class to instantiate and route requests to.HttpService
.public StreamingHttpService buildStreaming(javax.ws.rs.core.Application application)
StreamingHttpService
for the specified JAX-RS Application
.application
- the Application
to route requests to.StreamingHttpService
.public StreamingHttpService buildStreaming(java.lang.Class<? extends javax.ws.rs.core.Application> applicationClass)
StreamingHttpService
for the specified JAX-RS Application
class.applicationClass
- the Application
class to instantiate and route requests to.StreamingHttpService
.public BlockingHttpService buildBlocking(javax.ws.rs.core.Application application)
BlockingHttpService
for the specified JAX-RS Application
.application
- the Application
to route requests to.BlockingHttpService
.public BlockingHttpService buildBlocking(java.lang.Class<? extends javax.ws.rs.core.Application> applicationClass)
BlockingHttpService
for the specified JAX-RS Application
class.applicationClass
- the Application
class to instantiate and route requests to.BlockingHttpService
.public BlockingStreamingHttpService buildBlockingStreaming(javax.ws.rs.core.Application application)
BlockingStreamingHttpService
for the specified JAX-RS Application
.application
- the Application
to route requests to.BlockingStreamingHttpService
.public BlockingStreamingHttpService buildBlockingStreaming(java.lang.Class<? extends javax.ws.rs.core.Application> applicationClass)
BlockingStreamingHttpService
for the specified JAX-RS Application
class.applicationClass
- the Application
class to instantiate and route requests to.BlockingStreamingHttpService
.