com.sun.grizzly.websockets
Class SecKey
java.lang.Object
com.sun.grizzly.websockets.SecKey
public class SecKey
- extends Object
Class represents WebSocket
's security key, used during the handshake phase.
- Author:
- Alexey Stashok
KEY_SIZE
public static final int KEY_SIZE
- See Also:
- Constant Field Values
SecKey
public SecKey()
generateServerKey
public static SecKey generateServerKey(SecKey clientKey)
throws HandshakeException
- Generate server-side security key, which gets passed to the client during
the handshake phase as part of message payload.
- Parameters:
clientKey
- client's Sec-WebSocket-Key
- Returns:
- server key.
- Throws:
HandshakeException
getSecKey
public String getSecKey()
- Gets security key string representation, which includes chars and spaces.
- Returns:
- Security key string representation, which includes chars and spaces.
toString
public String toString()
- Overrides:
toString
in class Object
getBytes
public byte[] getBytes()
validateServerKey
public void validateServerKey(String serverKey)
Copyright © 2012 Oracle Corporation. All Rights Reserved.