Top Fields Constructors Methods
io.undertow.websockets.client

public Class WebSocket13ClientHandshake

extends WebSocketClientHandshake
Class Inheritance
Imports
io.undertow.util.FlexBase64, .Headers, io.undertow.websockets.WebSocketExtension, io.undertow.websockets.core.WebSocketChannel, .WebSocketMessages, .WebSocketVersion, io.undertow.websockets.core.protocol.version13.WebSocket13Channel, io.undertow.websockets.extensions.CompositeExtensionFunction, .ExtensionFunction, .ExtensionHandshake, .NoopExtensionFunction, org.xnio.OptionMap, .StreamConnection, io.undertow.connector.ByteBufferPool, org.xnio.http.ExtendedHandshakeChecker, java.io.IOException, java.net.URI, java.nio.charset.StandardCharsets, java.security.MessageDigest, .NoSuchAlgorithmException, .SecureRandom, java.util.ArrayList, .Collections, .HashMap, .HashSet, .Iterator, .List, .Locale, .Map, .Set

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final Set<ExtensionHandshake>
public static final String
private final WebSocketClientNegotiation
private static final SecureRandom
random

Create a static instance of SecureRandom, so it can be actually reused by all instances of this class.

Inherited from io.undertow.websockets.client.WebSocketClientHandshake:
url

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public WebSocketChannel
public Map<String, String>
protected String
private String
public WebSocketVersion
public ExtendedHandshakeChecker
protected final String
solve(final String nonceBase64)

Inherited from io.undertow.websockets.client.WebSocketClientHandshake:
createcreate

Field Detail

extensionsback to summary
private final Set<ExtensionHandshake> extensions
MAGIC_NUMBERback to summary
public static final String MAGIC_NUMBER
negotiationback to summary
private final WebSocketClientNegotiation negotiation
randomback to summary
private static final SecureRandom random

Create a static instance of SecureRandom, so it can be actually reused by all instances of this class. This should also increase the randomness of generated numbers.

Constructor Detail

WebSocket13ClientHandshakeback to summary
public WebSocket13ClientHandshake(final URI url, WebSocketClientNegotiation negotiation, Set<ExtensionHandshake> extensions)
WebSocket13ClientHandshakeback to summary
public WebSocket13ClientHandshake(final URI url)

Method Detail

createChannelback to summary
public WebSocketChannel createChannel(final StreamConnection channel, final String wsUri, final ByteBufferPool bufferPool, OptionMap options)

Implements abstract io.undertow.websockets.client.WebSocketClientHandshake.createChannel.

Annotations
@Override
createHeadersback to summary
public Map<String, String> createHeaders()

Implements abstract io.undertow.websockets.client.WebSocketClientHandshake.createHeaders.

createSecKeyback to summary
protected String createSecKey()
getFirstback to summary
private String getFirst(String key, Map<String, List<String>> map)
getVersionback to summary
public WebSocketVersion getVersion()
handshakeCheckerback to summary
public ExtendedHandshakeChecker handshakeChecker(final URI uri, final Map<String, List<String>> requestHeaders)

Implements abstract io.undertow.websockets.client.WebSocketClientHandshake.handshakeChecker.

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