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 Modifier and Type Field Description static StringMAGIC_NUMBER-
Fields inherited from class io.undertow.websockets.core.protocol.Handshake
allowExtensions, availableExtensions, subprotocols
-
-
Constructor Summary
Constructors Modifier Constructor Description Hybi07Handshake()protectedHybi07Handshake(WebSocketVersion version, Set<String> subprotocols, boolean allowExtensions)Hybi07Handshake(Set<String> subprotocols, boolean allowExtensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSocketChannelcreateChannel(WebSocketHttpExchange exchange, org.xnio.StreamConnection channel, ByteBufferPool pool)Create theWebSocketChannelfrom theWebSocketHttpExchangeprotected voidhandshakeInternal(WebSocketHttpExchange exchange)booleanmatches(WebSocketHttpExchange exchange)Returntrueif this implementation can be used to issue a handshake.protected Stringsolve(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
-
-
-
-
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()
-
-
Method Detail
-
matches
public boolean matches(WebSocketHttpExchange exchange)
Description copied from class:HandshakeReturntrueif this implementation can be used to issue a handshake.
-
handshakeInternal
protected void handshakeInternal(WebSocketHttpExchange exchange)
- Specified by:
handshakeInternalin classHandshake
-
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:HandshakeCreate theWebSocketChannelfrom theWebSocketHttpExchange- Specified by:
createChannelin classHandshake
-
-