Package io.helidon.webserver.jersey
Class JerseySupport
- java.lang.Object
-
- io.helidon.webserver.jersey.JerseySupport
-
- All Implemented Interfaces:
Service
public class JerseySupport extends Object implements Service
The Jersey Support integrates Jersey (JAX-RS RI) into the Web Server.To enable Jersey for a given path, do
In such case the registeredWebServer.create(Routing.builder() .register("/jersey", JerseySupport.builder() .register(JerseyExampleResource.class) .build()) .build());
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JerseySupport.Builder
Builder for convenient way to createJerseySupport
.
-
Field Summary
Fields Modifier and Type Field 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JerseySupport.Builder
builder()
CreatesJerseySupport
builder based on default emptyResourceConfig
.static JerseySupport.Builder
builder(Application application)
CreatesJerseySupport
builder based on a passed application.static JerseySupport
create(Application application)
CreatesJerseySupport
based on the providedJAX-RS Application
.void
update(Routing.Rules routingRules)
UpdatesRouting.Rules
withhandlers
representing this service.
-
-
-
Field Detail
-
REQUEST_SPAN_QUALIFIER
@Deprecated public static final String REQUEST_SPAN_QUALIFIER
Deprecated.Use span context (REQUEST_SPAN_CONTEXT
) instead.The request scoped span qualifier that can be injected into a Jersey resource.@Inject@Named(JerseySupport.REQUEST_SPAN_QUALIFIER) private Span span;
- See Also:
- Constant Field Values
-
REQUEST_SPAN_CONTEXT
public static final String REQUEST_SPAN_CONTEXT
The request scoped span context qualifier that can be injected into a Jersey resource.@Inject@Named(JerseySupport.REQUEST_SPAN_CONTEXT) private SpanContext spanContext;
- See Also:
- Constant Field Values
-
-
Method Detail
-
update
public void update(Routing.Rules routingRules)
Description copied from interface:Service
UpdatesRouting.Rules
withhandlers
representing this service.
-
create
public static JerseySupport create(Application application)
CreatesJerseySupport
based on the providedJAX-RS Application
.WebServer.create(Routing.builder() .register("/jersey", JerseySupport.create(new ResourceConfig(JerseyExampleResource.class))) .build());
- Parameters:
application
- the JAX-RS application to create this instance based on- Returns:
- the Jersey Support instance
- See Also:
builder(Application)
-
builder
public static JerseySupport.Builder builder()
CreatesJerseySupport
builder based on default emptyResourceConfig
.Every component must be registered on this builder by calling any of
register
methods. Properties can be set by the builder methodJerseySupport.Builder.property(String, Object)
.Build WebServer
:WebServer.create(Routing.builder() .register("/jersey", JerseySupport.builder() .register(JerseyExampleResource.class) .build()) .build());
- Returns:
- this
- See Also:
builder(Application)
-
builder
public static JerseySupport.Builder builder(Application application)
CreatesJerseySupport
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 methodJerseySupport.Builder.property(String, Object)
.Build WebServer
:WebServer.create(Routing.builder() .register("/jersey", JerseySupport.builder() .register(JerseyExampleResource.class) .build()) .build());
- Parameters:
application
- a base application- Returns:
- this
-
-