public final class Handshake extends Object
| Modifier and Type | Method and Description |
|---|---|
static Handshake |
createClientHandshake(UpgradeRequest webSocketRequest)
Client-side handshake.
|
UpgradeRequest |
getRequest()
Client side only - get the
UpgradeRequest. |
UpgradeRequest |
prepareRequest()
Client side only - compose the
UpgradeRequest and store it for further use. |
void |
setExtensions(List<Extension> extensions)
Client side only - set the list of supported extensions.
|
void |
setSubProtocols(List<String> subProtocols)
Client side only - set the list of supported subprotocols.
|
void |
validateServerResponse(UpgradeResponse response)
Client side only - validate server response.
|
public static Handshake createClientHandshake(UpgradeRequest webSocketRequest)
webSocketRequest - request representation to be modified for use as WebSocket handshake request.public UpgradeRequest getRequest()
UpgradeRequest.UpgradeRequest created on this HandShake.public void setSubProtocols(List<String> subProtocols)
subProtocols - list of supported subprotocol.public void setExtensions(List<Extension> extensions)
extensions - list of supported extensions.public UpgradeRequest prepareRequest()
UpgradeRequest and store it for further use.UpgradeRequest.public void validateServerResponse(UpgradeResponse response)
response - response to be validated.HandshakeException - when Http Status of received response is not 101 - Switching protocols.Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.