Package org.glassfish.grizzly.websockets
Class WebSocketClientFilter
java.lang.Object
org.glassfish.grizzly.filterchain.BaseFilter
org.glassfish.grizzly.websockets.BaseWebSocketFilter
org.glassfish.grizzly.websockets.WebSocketClientFilter
- All Implemented Interfaces:
org.glassfish.grizzly.filterchain.Filter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.glassfish.grizzly.filterchain.NextActionhandleConnect(org.glassfish.grizzly.filterchain.FilterChainContext ctx) Method handles GrizzlyConnectionconnect phase.protected org.glassfish.grizzly.filterchain.NextActionhandleHandshake(org.glassfish.grizzly.filterchain.FilterChainContext ctx, org.glassfish.grizzly.http.HttpContent content) Handle websocket handshakeMethods inherited from class org.glassfish.grizzly.websockets.BaseWebSocketFilter
handleClose, handleRead, handleWrite, onHandshakeFailure, setIdleTimeout, webSocketInProgressMethods inherited from class org.glassfish.grizzly.filterchain.BaseFilter
createContext, exceptionOccurred, handleAccept, handleEvent, onAdded, onFilterChainChanged, onRemoved, toString
-
Constructor Details
-
WebSocketClientFilter
public WebSocketClientFilter()
-
-
Method Details
-
handleConnect
public org.glassfish.grizzly.filterchain.NextAction handleConnect(org.glassfish.grizzly.filterchain.FilterChainContext ctx) throws IOException Method handles GrizzlyConnectionconnect phase. Check if theConnectionis a client-sideWebSocket, if yes - creates websocket handshake packet and send it to a server. Otherwise, if it's not websocket connection - pass processing to the nextFilterin a chain.- Specified by:
handleConnectin interfaceorg.glassfish.grizzly.filterchain.Filter- Overrides:
handleConnectin classorg.glassfish.grizzly.filterchain.BaseFilter- Parameters:
ctx-FilterChainContext- Returns:
NextActioninstruction forFilterChain, how it should continue the execution- Throws:
IOException
-
handleHandshake
protected org.glassfish.grizzly.filterchain.NextAction handleHandshake(org.glassfish.grizzly.filterchain.FilterChainContext ctx, org.glassfish.grizzly.http.HttpContent content) throws IOException Description copied from class:BaseWebSocketFilterHandle websocket handshake- Specified by:
handleHandshakein classBaseWebSocketFilter- Parameters:
ctx-FilterChainContextcontent- HTTP message- Returns:
NextActioninstruction forFilterChain, how it should continue the execution- Throws:
IOException
-