org.jboss.netty.handler.codec.http.websocketx

## Class WebSocketClientHandshakerFactory

- java.lang.Object
- - org.jboss.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory

-     public class WebSocketClientHandshakerFactory
      extends Object

  Instances the appropriate handshake class to use for clients

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebSocketClientHandshakerFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `WebSocketClientHandshaker` | `newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, Map<String,String> customHeaders)` Instances a new handshaker
    `WebSocketClientHandshaker` | `newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, Map<String,String> customHeaders, long maxFramePayloadLength)` Instances a new handshaker

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WebSocketClientHandshakerFactory

          public WebSocketClientHandshakerFactory()

  - ### Method Detail

    - #### newHandshaker

          public WebSocketClientHandshaker newHandshaker(URI webSocketURL,
                                                WebSocketVersion version,
                                                String subprotocol,
                                                boolean allowExtensions,
                                                Map<String,String> customHeaders)
                                                  throws WebSocketHandshakeException

      Instances a new handshaker
      Parameters:
        `webSocketURL` - URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL.
        `version` - Version of web socket specification to use to connect to the server
        `subprotocol` - Sub protocol request sent to the server. Null if no sub-protocol support is required.
        `allowExtensions` - Allow extensions to be used in the reserved bits of the web socket frame
        `customHeaders` - Custom HTTP headers to send during the handshake
      Throws:
        `WebSocketHandshakeException`

    - #### newHandshaker

          public WebSocketClientHandshaker newHandshaker(URI webSocketURL,
                                                WebSocketVersion version,
                                                String subprotocol,
                                                boolean allowExtensions,
                                                Map<String,String> customHeaders,
                                                long maxFramePayloadLength)
                                                  throws WebSocketHandshakeException

      Instances a new handshaker
      Parameters:
        `webSocketURL` - URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL.
        `version` - Version of web socket specification to use to connect to the server
        `subprotocol` - Sub protocol request sent to the server. Null if no sub-protocol support is required.
        `allowExtensions` - Allow extensions to be used in the reserved bits of the web socket frame
        `customHeaders` - Custom HTTP headers to send during the handshake
        `maxFramePayloadLength` - Maximum allowable frame payload length. Setting this value to your application's requirement may reduce denial of service attacks using long data frames.
      Throws:
        `WebSocketHandshakeException`

Copyright © 2008-2012 The Netty Project. All Rights Reserved.