org.glassfish.grizzly.websockets
Class ServerWebSocketMeta

java.lang.Object
  extended by org.glassfish.grizzly.websockets.WebSocketMeta
      extended by org.glassfish.grizzly.websockets.ServerWebSocketMeta

public class ServerWebSocketMeta
extends WebSocketMeta

Server-side WebSocket meta information.

Author:
Alexey Stashok
See Also:
WebSocketMeta, ClientWebSocketMeta

Constructor Summary
ServerWebSocketMeta(URI uri, String origin, String location, String protocol, byte[] key, Boolean isSecure)
          Construct a server-side WebSocketMeta using URI and security key.
 
Method Summary
 byte[] getKey()
          Get the WebSocket key value transferred as a part of response payload.
 String getLocation()
          Get the WebSocket "Sec-WebSocket-Location" header value
 String toString()
          The WebSocketMeta string description.
 
Methods inherited from class org.glassfish.grizzly.websockets.WebSocketMeta
getHandshakeHeader, getOrigin, getProtocol, getURI, isSecure, setHandshakeHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerWebSocketMeta

public ServerWebSocketMeta(URI uri,
                           String origin,
                           String location,
                           String protocol,
                           byte[] key,
                           Boolean isSecure)
Construct a server-side WebSocketMeta using URI and security key.

Parameters:
uri - WebSocket URI
origin - the WebSocket "Sec-WebSocket-Origin" header value
location - the WebSocket "Sec-WebSocket-Location" header value
protocol - the WebSocket "Sec-WebSocket-Protocol" header value
key - the WebSocket key value transferred as a part of response payload.
isSecure - true, if the WebSocket will be used in the secured mode, or false otherwise. It's possible to pass null, in this case WebSocket will try to autodetect security basing on passed uri parameter.
Method Detail

getKey

public byte[] getKey()
Get the WebSocket key value transferred as a part of response payload.

Returns:
the WebSocket key value transferred as a part of response payload.

getLocation

public String getLocation()
Get the WebSocket "Sec-WebSocket-Location" header value

Returns:
the WebSocket "Sec-WebSocket-Location" header value

toString

public String toString()
The WebSocketMeta string description.

Overrides:
toString in class WebSocketMeta
Returns:
the WebSocketMeta string description.


Copyright © 2010 Oracle Corpration. All Rights Reserved.