HttpHandlerpublic class WebSocketProtocolHandshakeHandler extends Object implements HttpHandler
HttpHandler which will process the HttpServerExchange and do the actual handshake/upgrade
to WebSocket.| Modifier and Type | Method | Description |
|---|---|---|
WebSocketProtocolHandshakeHandler |
addExtension(ExtensionHandshake extension) |
Add a new WebSocket Extension into the handshakes defined in this handler.
|
Set<WebSocketChannel> |
getPeerConnections() |
|
void |
handleRequest(HttpServerExchange exchange) |
Handle the request.
|
public WebSocketProtocolHandshakeHandler(WebSocketConnectionCallback callback)
WebSocketProtocolHandshakeHandlercallback - The WebSocketConnectionCallback which will be executed once the handshake was
establishedpublic WebSocketProtocolHandshakeHandler(WebSocketConnectionCallback callback, HttpHandler next)
WebSocketProtocolHandshakeHandlercallback - The WebSocketConnectionCallback which will be executed once the handshake was
establishedpublic WebSocketProtocolHandshakeHandler(Collection<Handshake> handshakes, WebSocketConnectionCallback callback)
WebSocketProtocolHandshakeHandlerhandshakes - The supported handshake methodscallback - The WebSocketConnectionCallback which will be executed once the handshake was
establishedpublic WebSocketProtocolHandshakeHandler(Collection<Handshake> handshakes, WebSocketConnectionCallback callback, HttpHandler next)
WebSocketProtocolHandshakeHandlerhandshakes - The supported handshake methodscallback - The WebSocketConnectionCallback which will be executed once the handshake was
establishedpublic WebSocketProtocolHandshakeHandler(HttpUpgradeListener callback)
WebSocketProtocolHandshakeHandlercallback - The WebSocketConnectionCallback which will be executed once the handshake was
establishedpublic WebSocketProtocolHandshakeHandler(HttpUpgradeListener callback, HttpHandler next)
WebSocketProtocolHandshakeHandlercallback - The WebSocketConnectionCallback which will be executed once the handshake was
establishedpublic WebSocketProtocolHandshakeHandler(Collection<Handshake> handshakes, HttpUpgradeListener callback)
WebSocketProtocolHandshakeHandlerhandshakes - The supported handshake methodscallback - The WebSocketConnectionCallback which will be executed once the handshake was
establishedpublic WebSocketProtocolHandshakeHandler(Collection<Handshake> handshakes, HttpUpgradeListener callback, HttpHandler next)
WebSocketProtocolHandshakeHandlerhandshakes - The supported handshake methodscallback - The WebSocketConnectionCallback which will be executed once the handshake was
establishedpublic void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandlerhandleRequest in interface HttpHandlerexchange - the HTTP request/response exchangeExceptionpublic Set<WebSocketChannel> getPeerConnections()
public WebSocketProtocolHandshakeHandler addExtension(ExtensionHandshake extension)
extension - a new ExtensionHandshake instanceCopyright © 2018. All rights reserved.