public class JerseySupport extends Object implements Service
To enable Jersey for a given path, do
WebServer.create(Routing.builder()
.register("/jersey",
JerseySupport.builder()
.register(JerseyExampleResource.class)
.build())
.build());
In such case the registered JerseySupport instance gets associated with the Web Server
and handles all requests made to /jersey context root.
Note that due to a blocking IO approach, each request handling is forwarded to a dedicated thread pool which can be configured by one of the JerseySupport constructor.
| Modifier and Type | Class and Description |
|---|---|
static class |
JerseySupport.Builder
Builder for convenient way to create
JerseySupport. |
| Modifier and Type | Field and Description |
|---|---|
static String |
REQUEST_SPAN_CONTEXT
The request scoped span context qualifier that can be injected into a Jersey resource.
|
static String |
REQUEST_SPAN_QUALIFIER
Deprecated.
Use span context (
REQUEST_SPAN_CONTEXT) instead. |
| Modifier and Type | Method and Description |
|---|---|
static JerseySupport.Builder |
builder()
Creates
JerseySupport builder based on default empty ResourceConfig. |
static JerseySupport.Builder |
builder(Application application)
Creates
JerseySupport builder based on a passed application. |
static JerseySupport |
create(Application application)
Creates
JerseySupport based on the provided JAX-RS Application. |
void |
update(Routing.Rules routingRules)
Updates
Routing.Rules with handlers representing this service. |
@Deprecated public static final String REQUEST_SPAN_QUALIFIER
REQUEST_SPAN_CONTEXT) instead.
@Inject @Named(JerseySupport.REQUEST_SPAN_QUALIFIER)
private Span span;
public static final String REQUEST_SPAN_CONTEXT
@Inject @Named(JerseySupport.REQUEST_SPAN_CONTEXT)
private SpanContext spanContext;
public void update(Routing.Rules routingRules)
ServiceRouting.Rules with handlers representing this service.public static JerseySupport create(Application application)
JerseySupport based on the provided JAX-RS Application.
WebServer.create(Routing.builder()
.register("/jersey",
JerseySupport.create(new ResourceConfig(JerseyExampleResource.class)))
.build());
application - the JAX-RS application to create this instance based onbuilder(Application)public static JerseySupport.Builder builder()
JerseySupport builder based on default empty ResourceConfig.
Every component must be registered on this builder by calling any of register methods.
Properties can be set by the builder method JerseySupport.Builder.property(String, Object).
Build WebServer:
WebServer.create(Routing.builder()
.register("/jersey",
JerseySupport.builder()
.register(JerseyExampleResource.class)
.build())
.build());
builder(Application)public static JerseySupport.Builder builder(Application application)
JerseySupport builder based on a passed application.
The application might be extended by calling any of register methods.
Properties can be set by the application, the builder method JerseySupport.Builder.property(String, Object).
Build WebServer:
WebServer.create(Routing.builder()
.register("/jersey",
JerseySupport.builder()
.register(JerseyExampleResource.class)
.build())
.build());
application - a base applicationCopyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.