Package io.helidon.microprofile.server
Class JaxRsApplication.Builder
- java.lang.Object
-
- io.helidon.microprofile.server.JaxRsApplication.Builder
-
- Enclosing class:
- JaxRsApplication
public static class JaxRsApplication.Builder extends Object
Fluent API builder to createJaxRsApplication
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JaxRsApplication.Builder
application(Class<? extends Application> appClass)
Set the JAX-RS application class that forms this instance.JaxRsApplication.Builder
application(Application app)
Set the JAX-RS application that forms this instance.JaxRsApplication
build()
Create a new instance based on this builder.JaxRsApplication.Builder
config(ResourceConfig config)
Set resource configuration that forms this application.JaxRsApplication.Builder
contextRoot(String contextRoot)
Configure an explicit context root for this application.JaxRsApplication.Builder
executorService(ExecutorService executorService)
Configure an executor service to be used for this application.
-
-
-
Method Detail
-
contextRoot
public JaxRsApplication.Builder contextRoot(String 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
public JaxRsApplication.Builder config(ResourceConfig 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(Application)
,application(Class)
-
application
public JaxRsApplication.Builder application(Application app)
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(Class)
,config(ResourceConfig)
-
application
public JaxRsApplication.Builder application(Class<? extends Application> appClass)
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:
application(Application)
,config(ResourceConfig)
-
executorService
public JaxRsApplication.Builder executorService(ExecutorService 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
-
build
public JaxRsApplication build()
Create a new instance based on this builder.- Returns:
- application ready to be registered with
Server.Builder.addApplication(JaxRsApplication)
-
-