io.undertow.websockets.core.protocol.version07

## Class Hybi07Handshake

- java.lang.Object
- - io.undertow.websockets.core.protocol.Handshake
  - - io.undertow.websockets.core.protocol.version07.Hybi07Handshake

Direct Known Subclasses:
  Hybi08Handshake, Hybi13Handshake

    public class Hybi07Handshake
    extends Handshake

The handshaking protocol implementation for Hybi-07.

Author:
  Mike Brock

### Field Summary

Fields
`static String` `MAGIC_NUMBER`

### Fields inherited from class io.undertow.websockets.core.protocol.Handshake

`allowExtensions, availableExtensions, subprotocols`

### Constructor Summary

Constructors
`` `Hybi07Handshake()`
`` `Hybi07Handshake(Set<String> subprotocols, boolean allowExtensions)`
`protected` `Hybi07Handshake(WebSocketVersion version, Set<String> subprotocols, boolean allowExtensions)`

### Method Summary

All Methods Instance Methods Concrete Methods
`WebSocketChannel` `createChannel(WebSocketHttpExchange exchange, org.xnio.StreamConnection channel, ByteBufferPool pool)` Create the `WebSocketChannel` from the `WebSocketHttpExchange`
`protected void` `handshakeInternal(WebSocketHttpExchange exchange)`
`boolean` `matches(WebSocketHttpExchange exchange)` Return `true` if this implementation can be used to issue a handshake.
`protected String` `solve(String nonceBase64)`

### Methods inherited from class io.undertow.websockets.core.protocol.Handshake

`addExtension, getHashAlgorithm, getMagicNumber, getVersion, getWebSocketLocation, handshake, initExtensions, performUpgrade, performUpgrade, selectedExtension, selectExtensions, selectSubprotocol, supportedSubprotols, upgradeChannel`

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

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

### Field Detail

#### MAGIC_NUMBER

    public static final String MAGIC_NUMBER

See Also:
  Constant Field Values

### Constructor Detail

#### Hybi07Handshake

    protected Hybi07Handshake(WebSocketVersion version,
                              Set<String> subprotocols,
                              boolean allowExtensions)

#### Hybi07Handshake

    public Hybi07Handshake(Set<String> subprotocols,
                           boolean allowExtensions)

#### Hybi07Handshake

    public Hybi07Handshake()

### Method Detail

#### matches

    public boolean matches(WebSocketHttpExchange exchange)

Description copied from class: `Handshake`
Return `true` if this implementation can be used to issue a handshake.

Specified by:
  `matches` in class `Handshake`

#### handshakeInternal

    protected void handshakeInternal(WebSocketHttpExchange exchange)

Specified by:
  `handshakeInternal` in class `Handshake`

#### solve

    protected final String solve(String nonceBase64)
                          throws NoSuchAlgorithmException

Throws:
  `NoSuchAlgorithmException`

#### createChannel

    public WebSocketChannel createChannel(WebSocketHttpExchange exchange,
                                          org.xnio.StreamConnection channel,
                                          ByteBufferPool pool)

Description copied from class: `Handshake`
Create the `WebSocketChannel` from the `WebSocketHttpExchange`

Specified by:
  `createChannel` in class `Handshake`