| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap | |
| private final List | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | |
| public WebSocket | Returns: a newWebSocket instance.the handler, WebSocketListener... ProtocolHandler to use with the newly created WebSocket.the listeners)WebSocketListeners to associate with the new WebSocket.
Deprecated
Use
WebSocketApplication#createSocket(ProtocolHandler, org.
Factory method to create new |
| public WebSocket | createSocket(final ProtocolHandler
the handler, final HttpRequestPacket ProtocolHandler to use with the newly created WebSocket.the requestPacket, final WebSocketListener... HttpRequestPacket that triggered the creation of the WebSocket connection.the listeners)WebSocketListeners to associate with the new WebSocket.Factory method to create new |
| public List | Returns: the websocket extensions supported by thisWebSocketApplication.Return the websocket extensions supported by this |
| public List | |
| protected Set | Returns: a set ofWebSockets, registered with the application.Returns a set of |
| protected void | |
| public boolean | Returns: true if this application can service this request
the incoming HTTP request. request)
Deprecated
URI mapping shouldn't be intrinsic to the application.
Checks application specific criteria to determine if this application can process the request as a WebSocket connection. |
| public void | onClose(WebSocket
the socket, DataFrame WebSocket being closed.the closing frame. frame)Overrides org. Implements org. When a |
| public void | onConnect(WebSocket
the new socket)WebSocket connection.Overrides org. Implements org. When a new |
| protected boolean | |
| public void | onExtensionNegotiation(List<Extension>
the intersection of extensions between client and application. extensions)Invoked during the handshake if the client has advertised extensions it may use and one or more extensions intersect
with those returned by |
| public boolean | |
| public final boolean | Returns: true if the request should be upgraded to a WebSocket connectionChecks protocol specific information can and should be upgraded. |
| sockets | back to summary |
|---|---|
| private final ConcurrentMap<WebSocket, Boolean> sockets | |
| supportedExtensions | back to summary |
|---|---|
| private final List<Extension> supportedExtensions | |
| supportedProtocols | back to summary |
|---|---|
| private final List<String> supportedProtocols | |
| WebSocketApplication | back to summary |
|---|---|
| public WebSocketApplication() | |
| add | back to summary |
|---|---|
| protected boolean add(WebSocket socket) Associates the specified | |
| createSocket | back to summary |
|---|---|
| public WebSocket createSocket(ProtocolHandler handler, WebSocketListener... listeners)
Deprecated Factory method to create new
| |
| createSocket | back to summary |
|---|---|
| public WebSocket createSocket(final ProtocolHandler handler, final HttpRequestPacket requestPacket, final WebSocketListener... listeners) Factory method to create new
| |
| getSupportedExtensions | back to summary |
|---|---|
| public List Return the websocket extensions supported by this | |
| getSupportedProtocols | back to summary |
|---|---|
| public List | |
| getWebSockets | back to summary |
|---|---|
| protected Set Returns a set of | |
| handshake | back to summary |
|---|---|
| protected void handshake(HandShake handshake) throws HandshakeException This method will be called, when initial
| |
| isApplicationRequest | back to summary |
|---|---|
| public boolean isApplicationRequest(HttpRequestPacket request)
Deprecated URI mapping shouldn't be intrinsic to the application. WebSocketApplications should be registered using
Checks application specific criteria to determine if this application can process the request as a WebSocket connection.
| |
| onClose | back to summary |
|---|---|
| public void onClose(WebSocket socket, DataFrame frame) Overrides org. Implements org. When a | |
| onConnect | back to summary |
|---|---|
| public void onConnect(WebSocket socket) Overrides org. Implements org. When a new | |
| onError | back to summary |
|---|---|
| protected boolean onError(final WebSocket webSocket, final Throwable t) This method will be invoked if an unexpected exception is caught by the WebSocket runtime. | |
| onExtensionNegotiation | back to summary |
|---|---|
| public void onExtensionNegotiation(List<Extension> extensions) Invoked during the handshake if the client has advertised extensions it may use and one or more extensions intersect
with those returned by | |
| remove | back to summary |
|---|---|
| public boolean remove(WebSocket socket) Unassociates the specified | |
| upgrade | back to summary |
|---|---|
| public final boolean upgrade(HttpRequestPacket request) Checks protocol specific information can and should be upgraded.
The default implementation will check for the presence of the
| |