- java.lang.Object
-
- io.helidon.microprofile.server.JaxRsApplication
-
public final class JaxRsApplication extends Object
A JAX-RS application to be registered. Can configure additional fields that are not part of JAX-RS configuration (all optional):- contextRoot - what is the base URI of this application (e.g. /myApp)
- executorService - executor service to use when executing requests for this application a single executor service can be shared between multiple applications
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JaxRsApplication.Builder
Fluent API builder to createJaxRsApplication
instances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Class<? extends Application>>
applicationClass()
Application class, if this application is based on an actual class.static JaxRsApplication.Builder
builder()
A new fluent API builder to create a customizedJaxRsApplication
.static JaxRsApplication
create(Class<? extends Application> application)
Create a new instance based on an JAX-RS Application class.static JaxRsApplication
create(Application application)
Create an instance based on a JAX-RS application.ResourceConfig
resourceConfig()
Resource config of this application.boolean
synthetic()
Indicates whether this app was identified as synthetic when it was built.String
toString()
-
-
-
Method Detail
-
create
public static JaxRsApplication create(Class<? extends Application> application)
Create a new instance based on an JAX-RS Application class.- Parameters:
application
- class of an application (JAX-RS) to wrap- Returns:
- a new instance based on the application on root context path with no executor service (will use server default)
-
create
public static JaxRsApplication create(Application application)
Create an instance based on a JAX-RS application.- Parameters:
application
- JAX-RS application instance- Returns:
- a new instance based on the application on root context path with no executor service (will use server default)
-
builder
public static JaxRsApplication.Builder builder()
A new fluent API builder to create a customizedJaxRsApplication
.- Returns:
- a new builder instance
-
resourceConfig
public ResourceConfig resourceConfig()
Resource config of this application.- Returns:
- config to register additional providers
-
synthetic
public boolean synthetic()
Indicates whether this app was identified as synthetic when it was built.- Returns:
- true if synthetic, false otherwise
-
applicationClass
public Optional<Class<? extends Application>> applicationClass()
Application class, if this application is based on an actual class.- Returns:
- application class or empty optional if this is a synthetic application
-
-