- All Superinterfaces:
Handler,ServerLifecycle
- All Known Implementing Classes:
SecureHandler,SecurityHandler
Handler that can enforce route policy for an HTTP/1 protocol upgrade request
without invoking the route endpoint handler.
Implementations must call ServerResponse.next() to allow the protocol
switch to continue, send a response to reject the switch, or reroute the
request back to ordinary HTTP routing. Ordinary HTTP endpoint handlers are
intentionally not invoked while routing upgrade policy.
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleProtocolUpgrade(ServerRequest req, ServerResponse res) Handle an HTTP/1 protocol upgrade request before the protocol switch.Methods inherited from interface io.helidon.webserver.ServerLifecycle
afterStart, afterStop, beforeStart
-
Method Details
-
handleProtocolUpgrade
Handle an HTTP/1 protocol upgrade request before the protocol switch. The handler follows the same response contract as ordinary routing: callServerResponse.next()to allow the protocol switch, send a response to reject the switch, or reroute the request back to ordinary HTTP routing.- Parameters:
req- server requestres- server response- Throws:
Exception- in case of a processing error
-