Interface WebSocketNegotiator
- All Superinterfaces:
Configuration.Customizer
- All Known Implementing Classes:
CreatorNegotiator
,WebSocketNegotiator.AbstractNegotiator
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
customize
(Configuration configurable) static WebSocketNegotiator
from
(WebSocketCreator creator, FrameHandlerFactory factory) static WebSocketNegotiator
from
(WebSocketCreator creator, FrameHandlerFactory factory, Configuration.Customizer customizer) negotiate
(ServerUpgradeRequest request, ServerUpgradeResponse response, Callback callback) Creates aFrameHandler
from the incoming request.
-
Method Details
-
negotiate
FrameHandler negotiate(ServerUpgradeRequest request, ServerUpgradeResponse response, Callback callback) Creates a
FrameHandler
from the incoming request.If the negotiator returns null it is responsible for completing the
Callback
and sending a response. If the negotiator intends to return non-nullFrameHandler
, it MUST NOT write content to the response or complete theCallback
, but it may modify the response headers.- Parameters:
request
- the request detailsresponse
- the response detailscallback
- the callback, should only be completed by the creator if a null WebSocket object is returned.- Returns:
- the FrameHandler, or null to take responsibility to send error response if no WebSocket is to be created.
-
from
-
from
static WebSocketNegotiator from(WebSocketCreator creator, FrameHandlerFactory factory, Configuration.Customizer customizer) -
customize
- Specified by:
customize
in interfaceConfiguration.Customizer
-