Class WebSocketAdapterFilter
- java.lang.Object
-
- org.glassfish.grizzly.filterchain.BaseFilter
-
- org.forgerock.openig.websocket.grizzly.WebSocketAdapterFilter
-
- All Implemented Interfaces:
org.glassfish.grizzly.filterchain.Filter
public class WebSocketAdapterFilter extends org.glassfish.grizzly.filterchain.BaseFilter
Top-level filter in the Grizzly filter chain.For the downstream flow (
handleWrite(FilterChainContext)
), it first initiates the HTTP handshake, and on subsequent messages, it just forwards them unchanged (web-socket protocol).For upstream flow (
handleRead(FilterChainContext)
), it simply writes the received message to the servlet connection (in the direction of the web-socket client).It reacts to a successful handshake event, by upgrading the associate servlet connection.
-
-
Constructor Summary
Constructors Constructor Description WebSocketAdapterFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.glassfish.grizzly.filterchain.NextAction
handleEvent(org.glassfish.grizzly.filterchain.FilterChainContext ctx, org.glassfish.grizzly.filterchain.FilterChainEvent event)
org.glassfish.grizzly.filterchain.NextAction
handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
org.glassfish.grizzly.filterchain.NextAction
handleWrite(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
-
-
-
Method Detail
-
handleRead
public org.glassfish.grizzly.filterchain.NextAction handleRead(org.glassfish.grizzly.filterchain.FilterChainContext ctx) throws IOException
- Specified by:
handleRead
in interfaceorg.glassfish.grizzly.filterchain.Filter
- Overrides:
handleRead
in classorg.glassfish.grizzly.filterchain.BaseFilter
- Throws:
IOException
-
handleWrite
public org.glassfish.grizzly.filterchain.NextAction handleWrite(org.glassfish.grizzly.filterchain.FilterChainContext ctx)
- Specified by:
handleWrite
in interfaceorg.glassfish.grizzly.filterchain.Filter
- Overrides:
handleWrite
in classorg.glassfish.grizzly.filterchain.BaseFilter
-
handleEvent
public org.glassfish.grizzly.filterchain.NextAction handleEvent(org.glassfish.grizzly.filterchain.FilterChainContext ctx, org.glassfish.grizzly.filterchain.FilterChainEvent event) throws IOException
- Specified by:
handleEvent
in interfaceorg.glassfish.grizzly.filterchain.Filter
- Overrides:
handleEvent
in classorg.glassfish.grizzly.filterchain.BaseFilter
- Throws:
IOException
-
-