Package io.helidon.microprofile.server
Class ServerCdiExtension
java.lang.Object
io.helidon.microprofile.server.ServerCdiExtension
- All Implemented Interfaces:
Extension
Extension to handle web server configuration and lifecycle.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBase path of this server.voiddefaultExecutorService(Supplier<? extends ExecutorService> defaultExecutorService) Configure the default executor service to be used by this server.host()Current host the server is running on.intport()Current port the server is running on.intNamed port the server is running on.routingBuilder(Optional<String> namedRouting, boolean routingNameRequired, String appName) Provides access to routing builder.Helidon web server configuration builder that can be used to re-configure the web server.Helidon webserver routing builder that can be used to add routes to a named socket of the webserver.Helidon webserver routing builder that can be used to add routes to the webserver.booleanstarted()State of the server.
-
Constructor Details
-
ServerCdiExtension
public ServerCdiExtension()
-
-
Method Details
-
routingBuilder
public Routing.Builder routingBuilder(Optional<String> namedRouting, boolean routingNameRequired, String appName) Provides access to routing builder.- Parameters:
namedRouting- Named routing.routingNameRequired- Routing name required.appName- Application's name.- Returns:
- The routing builder.
-
serverBuilder
Helidon web server configuration builder that can be used to re-configure the web server.- Returns:
- web server configuration builder
-
serverRoutingBuilder
Helidon webserver routing builder that can be used to add routes to the webserver.- Returns:
- server routing builder
-
serverNamedRoutingBuilder
Helidon webserver routing builder that can be used to add routes to a named socket of the webserver.- Parameters:
name- name of the named routing (should match a named socket configuration)- Returns:
- builder for routing of the named route
-
defaultExecutorService
Configure the default executor service to be used by this server.- Parameters:
defaultExecutorService- executor service supplier
-
host
Current host the server is running on.- Returns:
- host of this server
-
port
public int port()Current port the server is running on. This information is only available after the server is actually started.- Returns:
- port the server is running on
-
port
Named port the server is running on. This information is only available after the server is actually started.- Parameters:
name- Socket name- Returns:
- Named port the server is running on
-
started
public boolean started()State of the server.- Returns:
trueif the server is already started,falseotherwise
-
basePath
Base path of this server. This is used to redirect when a request is made for root ("/").- Parameters:
basePath- path to redirect to when user requests the root path
-