public interface Routing
Routing represents composition of HTTP request-response handlers with routing rules.
It is a cornerstone of the
WebServer.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classARoutingbuilder.static interfaceAn API to define HTTP request routing rules. -
Method Summary
Modifier and TypeMethodDescriptionstatic Routing.Builderbuilder()Creates new instance ofrouting builder.default WebServerDeprecated.default WebServercreateServer(ServerConfiguration configuration) Deprecated.since 2.0.0 please useWebServer.builder(Routing)insteadvoidroute(BareRequest bareRequest, BareResponse bareResponse) Process bare minimal request and response using this routing.
-
Method Details
-
route
Process bare minimal request and response using this routing.- Parameters:
bareRequest- HTTP request to processbareResponse- HTTP response to process
-
builder
Creates new instance ofrouting builder.- Returns:
- a new instance
-
createServer
Deprecated.since 2.0.0 please useWebServer.builder(Routing)insteadCreates newWebServerinstance with provided configuration and this routing.- Parameters:
configuration- a web server configuration- Returns:
- new
WebServerinstance - Throws:
IllegalStateException- if none SPI implementation found
-
createServer
Deprecated.since 2.0.0 please useWebServer.builder(Routing)insteadCreates newWebServerinstance with this routing and default configuration.- Returns:
- new
WebServerinstance - Throws:
IllegalStateException- if none SPI implementation found
-
WebServer.builder(Routing)instead