Interface WebSocketCreator
public interface WebSocketCreator
Allows to create (custom) WebSocket endpoints instances given the HTTP request and HTTP response.
- 
Method Summary
Modifier and TypeMethodDescriptioncreateWebSocket(ServerUpgradeRequest upgradeRequest, ServerUpgradeResponse upgradeResponse, Callback callback) Creates a WebSocket endpoint instance from the incoming request. 
- 
Method Details
- 
createWebSocket
Object createWebSocket(ServerUpgradeRequest upgradeRequest, ServerUpgradeResponse upgradeResponse, Callback callback) throws Exception Creates a WebSocket endpoint instance from the incoming request.
If the implementation does not want to create a WebSocket endpoint instance, it is responsible to send a response (and completing the callback) and then it may return
null.If the implementation returns a non-
nullWebSocket endpoint instance, it must not write response content, nor completing the callback, but it may modify the response headers.- Parameters:
 upgradeRequest- the upgrade requestupgradeResponse- the upgrade responsecallback- the callback to complete only when returningnull- Returns:
 - a WebSocket endpoint instance, or 
nullif no WebSocket endpoint instance should be created for the given upgrade request - Throws:
 Exception- if the WebSocket endpoint instance creation fails
 
 -