public class WebSocketClientFilter extends BaseWebSocketFilter
Constructor and Description |
---|
WebSocketClientFilter() |
Modifier and Type | Method and Description |
---|---|
NextAction |
handleConnect(FilterChainContext ctx)
Method handles Grizzly
Connection connect phase. |
protected NextAction |
handleHandshake(FilterChainContext ctx,
HttpContent content)
Handle websocket handshake
|
handleClose, handleRead, handleWrite, onHandshakeFailure, setIdleTimeout, webSocketInProgress
createContext, exceptionOccurred, handleAccept, handleEvent, onAdded, onFilterChainChanged, onRemoved
public NextAction handleConnect(FilterChainContext ctx) throws IOException
Connection
connect phase. Check if the Connection
is a client-side WebSocket
, if yes - creates websocket handshake packet and send it to a server. Otherwise, if it's not websocket
connection - pass processing to the next Filter
in a chain.handleConnect
in interface Filter
handleConnect
in class BaseFilter
ctx
- FilterChainContext
NextAction
instruction for FilterChain
, how it should continue the executionIOException
protected NextAction handleHandshake(FilterChainContext ctx, HttpContent content) throws IOException
BaseWebSocketFilter
handleHandshake
in class BaseWebSocketFilter
ctx
- FilterChainContext
content
- HTTP messageNextAction
instruction for FilterChain
, how it should continue the executionIOException
Copyright © 2015 Oracle Corporation. All rights reserved.