Class JaxRsApplication.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • 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
      • appName

        public JaxRsApplication.Builder appName​(String name)
        Configure an explicit application name.
        Parameters:
        name - name to use for this application, mostly for troubleshooting purposes
        Returns:
        updated builder instance
      • 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
      • routingName

        public JaxRsApplication.Builder routingName​(String 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 the RoutingName.DEFAULT_NAME.
        Parameters:
        routingName - name to use
        Returns:
        updated builder instance
      • routingNameRequired

        public JaxRsApplication.Builder routingNameRequired​(boolean routingNameRequired)
        In case the JaxRsApplication.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 to true if the named routing must be configured on web server, set to false to use default routing if the named routing is missing
        Returns:
        updated builder instance
      • applicationClass

        public JaxRsApplication.Builder applicationClass​(Class<? extends Application> 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