Package io.helidon.webserver
Interface Routing
-
public interface Routing
Routing represents composition of HTTP request-response handlers with routing rules. It is together withServerConfiguration.Builder
a cornerstone of theWebServer
.- See Also:
WebServer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Routing.Builder
ARouting
builder.static interface
Routing.Rules
An API to define HTTP request routing rules.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Routing.Builder
builder()
Creates new instance ofrouting builder
.default WebServer
createServer()
Creates newWebServer
instance with this routing and default configuration.default WebServer
createServer(ServerConfiguration configuration)
Creates newWebServer
instance with provided configuration and this routing.void
route(BareRequest bareRequest, BareResponse bareResponse)
Process bare minimal request and response using this routing.
-
-
-
Method Detail
-
route
void route(BareRequest bareRequest, BareResponse bareResponse)
Process bare minimal request and response using this routing.- Parameters:
bareRequest
- HTTP request to tryProcessbareResponse
- HTTP response to tryProcess
-
builder
static Routing.Builder builder()
Creates new instance ofrouting builder
.- Returns:
- a new instance
-
createServer
default WebServer createServer(ServerConfiguration configuration)
Creates newWebServer
instance with provided configuration and this routing.- Parameters:
configuration
- a web server configuration- Returns:
- new
WebServer
instance - Throws:
IllegalStateException
- if none SPI implementation found
-
createServer
default WebServer createServer()
Creates newWebServer
instance with this routing and default configuration.- Returns:
- new
WebServer
instance - Throws:
IllegalStateException
- if none SPI implementation found
-
-