Package io.helidon.microprofile.server
Class JaxRsApplication.Builder
java.lang.Object
io.helidon.microprofile.server.JaxRsApplication.Builder
- Enclosing class:
JaxRsApplication
Fluent API builder to create
JaxRsApplication
instances.-
Method Summary
Modifier and TypeMethodDescriptionapplication
(Application app) Set the JAX-RS application that forms this instance.application
(Class<? extends Application> appClass) Set the JAX-RS application class that forms this instance.applicationClass
(Class<? extends Application> applicationClass) Configure an application class without inspecting it for annotations and without creating a config from it.Configure an explicit application name.build()
Create a new instance based on this builder.config
(ResourceConfig config) Set resource configuration that forms this application.contextRoot
(String contextRoot) Configure an explicit context root for this application.executorService
(ExecutorService executorService) Configure an executor service to be used for this application.routingName
(String routingName) Configure a routing name.routingNameRequired
(boolean routingNameRequired) In case theJaxRsApplication.routingName()
is configured to a non-default name, you can control with this property whether the name is required (and boot would fail if such a named port is not configured), or default routing is used when the named one is missing.
-
Method Details
-
contextRoot
Configure an explicit context root for this application.- Parameters:
contextRoot
- context root to expose this application on, defaults to "/"- Returns:
- updated builder instance
-
config
Set resource configuration that forms this application. This will replace the current application (if any) with the specified config.- Parameters:
config
- Jersey resource config to use- Returns:
- updated builder instance
- See Also:
-
application
Set the JAX-RS application that forms this instance. This will replace the current application (if any) with the specified application.- Parameters:
app
- JAX-RS application instance- Returns:
- updated builder instance
- See Also:
-
application
Set the JAX-RS application class that forms this instance. This will replace the current application (if any) with the specified application.- Parameters:
appClass
- JAX-RS application class- Returns:
- updated builder instance
- See Also:
-
appName
Configure an explicit application name.- Parameters:
name
- name to use for this application, mostly for troubleshooting purposes- Returns:
- updated builder instance
-
executorService
Configure an executor service to be used for this application. Executor services can be shared between applications. If none is defined, server default will be used.- Parameters:
executorService
- executor service to use with this application- Returns:
- updated builder instance
-
routingName
Configure a routing name. This tells us this application should bind to a named port of the web server. To reset routing name to default, configure theRoutingName.DEFAULT_NAME
.- Parameters:
routingName
- name to use- Returns:
- updated builder instance
-
routingNameRequired
In case theJaxRsApplication.routingName()
is configured to a non-default name, you can control with this property whether the name is required (and boot would fail if such a named port is not configured), or default routing is used when the named one is missing.- Parameters:
routingNameRequired
- set totrue
if the named routing must be configured on web server, set tofalse
to use default routing if the named routing is missing- Returns:
- updated builder instance
-
build
Create a new instance based on this builder.- Returns:
- application ready to be registered with
Server.Builder.addApplication(JaxRsApplication)
-
applicationClass
Configure an application class without inspecting it for annotations and without creating a config from it.- Parameters:
applicationClass
- class to use- Returns:
- updated builer instance
-