Top Description Fields Constructors Methods
io.undertow.websockets.core.protocol.version07

public Class Hybi07Handshake

extends Handshake
Class Inheritance
Known Direct Subclasses
io.undertow.websockets.core.protocol.version08.Hybi08Handshake, io.undertow.websockets.core.protocol.version13.Hybi13Handshake
Imports
io.undertow.util.Headers, io.undertow.websockets.core.WebSocketChannel, .WebSocketVersion, io.undertow.websockets.core.protocol.Handshake, io.undertow.websockets.extensions.CompositeExtensionFunction, .ExtensionFunction, io.undertow.websockets.spi.WebSocketHttpExchange, org.xnio.IoUtils, .StreamConnection, io.undertow.connector.ByteBufferPool, java.nio.charset.StandardCharsets, java.security.MessageDigest, .NoSuchAlgorithmException, java.util.Collections, .List, .Set

The handshaking protocol implementation for Hybi-07.
Author
Mike Brock

Field Summary

Modifier and TypeField and Description
public static final String
Inherited from io.undertow.websockets.core.protocol.Handshake:
allowExtensionsavailableExtensionssubprotocols

Constructor Summary

AccessConstructor and Description
protected
Hybi07Handshake(final WebSocketVersion version, final Set<String> subprotocols, boolean allowExtensions)

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

public

Method Summary

Modifier and TypeMethod and Description
public WebSocketChannel
protected void
public boolean
matches(final WebSocketHttpExchange exchange)

Implements abstract io.undertow.websockets.core.protocol.Handshake.matches.

Return true if this implementation can be used to issue a handshake.

protected final String
solve(final String nonceBase64)

Inherited from io.undertow.websockets.core.protocol.Handshake:
addExtensiongetHashAlgorithmgetMagicNumbergetVersiongetWebSocketLocationhandshakeinitExtensionsperformUpgradeperformUpgradeselectedExtensionselectExtensionsselectSubprotocolsupportedSubprotolsupgradeChannel

Field Detail

MAGIC_NUMBERback to summary
public static final String MAGIC_NUMBER

Constructor Detail

Hybi07Handshakeback to summary
protected Hybi07Handshake(final WebSocketVersion version, final Set<String> subprotocols, boolean allowExtensions)
Hybi07Handshakeback to summary
public Hybi07Handshake(final Set<String> subprotocols, boolean allowExtensions)
Hybi07Handshakeback to summary
public Hybi07Handshake()

Method Detail

createChannelback to summary
public WebSocketChannel createChannel(WebSocketHttpExchange exchange, final StreamConnection channel, final ByteBufferPool pool)

Implements abstract io.undertow.websockets.core.protocol.Handshake.createChannel.

Doc from io.undertow.websockets.core.protocol.Handshake.createChannel.

Create the WebSocketChannel from the WebSocketHttpExchange

Annotations
@Override
handshakeInternalback to summary
protected void handshakeInternal(final WebSocketHttpExchange exchange)

Implements abstract io.undertow.websockets.core.protocol.Handshake.handshakeInternal.

matchesback to summary
public boolean matches(final WebSocketHttpExchange exchange)

Implements abstract io.undertow.websockets.core.protocol.Handshake.matches.

Doc from io.undertow.websockets.core.protocol.Handshake.matches.

Return true if this implementation can be used to issue a handshake.

Annotations
@Override
solveback to summary
protected final String solve(final String nonceBase64) throws NoSuchAlgorithmException