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 String
MAGIC_NUMBER
-
Fields inherited from class io.undertow.websockets.core.protocol.Handshake
allowExtensions, availableExtensions, subprotocols
-
-
Constructor Summary
Constructors Modifier Constructor Description Hybi07Handshake()
protected
Hybi07Handshake(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 WebSocketChannel
createChannel(WebSocketHttpExchange exchange, org.xnio.StreamConnection channel, ByteBufferPool pool)
Create theWebSocketChannel
from theWebSocketHttpExchange
protected void
handshakeInternal(WebSocketHttpExchange exchange)
boolean
matches(WebSocketHttpExchange exchange)
Returntrue
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
-
-
-
-
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:Handshake
Returntrue
if this implementation can be used to issue a handshake.
-
handshakeInternal
protected void handshakeInternal(WebSocketHttpExchange exchange)
- Specified by:
handshakeInternal
in 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:Handshake
Create theWebSocketChannel
from theWebSocketHttpExchange
- Specified by:
createChannel
in classHandshake
-
-