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

public class WebSocketClientFilter extends BaseWebSocketFilter
  • 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 Grizzly 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.
      Specified by:
      handleConnect in interface org.glassfish.grizzly.filterchain.Filter
      Overrides:
      handleConnect in class org.glassfish.grizzly.filterchain.BaseFilter
      Parameters:
      ctx - FilterChainContext
      Returns:
      NextAction instruction for FilterChain, 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: BaseWebSocketFilter
      Handle websocket handshake
      Specified by:
      handleHandshake in class BaseWebSocketFilter
      Parameters:
      ctx - FilterChainContext
      content - HTTP message
      Returns:
      NextAction instruction for FilterChain, how it should continue the execution
      Throws:
      IOException