public final class ZKWebSocket
extends javax.websocket.server.ServerEndpointConfig.Configurator
Modifier and Type | Class and Description |
---|---|
static class |
ZKWebSocket.ZKPrinciple |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONNECTION_UUID_PARAM |
static java.lang.String |
DESKTOP_ID_PARAM |
Constructor and Description |
---|
ZKWebSocket() |
Modifier and Type | Method and Description |
---|---|
static Desktop |
getDesktop(javax.websocket.Session wsession)
Returns the desktop from the given websocket session.
|
static Storage |
getDesktopStorage(javax.websocket.Session wsession)
Returns a storage in desktop scope from the given websocket session.
|
static void |
initZkDesktop(javax.websocket.Session wsession,
javax.websocket.EndpointConfig config)
Stores the zksession and desktop id into the websocket session userProperties, removes the temporary key/value from the
endpoint userProperties.
|
void |
modifyHandshake(javax.websocket.server.ServerEndpointConfig config,
javax.websocket.server.HandshakeRequest request,
javax.websocket.HandshakeResponse response)
Retrieves the current zk session from handshake request and store this temporarily under a unique key
('${desktopid}|[${connection_uuid}]') inside the endpoint config userProperties.
|
public static final java.lang.String DESKTOP_ID_PARAM
public static final java.lang.String CONNECTION_UUID_PARAM
public void modifyHandshake(javax.websocket.server.ServerEndpointConfig config, javax.websocket.server.HandshakeRequest request, javax.websocket.HandshakeResponse response)
initZkDesktop(Session, EndpointConfig)
modifyHandshake
in class javax.websocket.server.ServerEndpointConfig.Configurator
config
- request
- response
- public static void initZkDesktop(javax.websocket.Session wsession, javax.websocket.EndpointConfig config)
getDesktop(Session)
.
This method is called during websocket endpoint onOpen.
E.g. WebSocketEndPoint.onOpen(Session, EndpointConfig)
wsession
- Websocket sessionconfig
- Endpoint configpublic static Storage getDesktopStorage(javax.websocket.Session wsession)
wsession
- websocket sessionpublic static Desktop getDesktop(javax.websocket.Session wsession)
wsession
- websocket sessionCopyright © 2005-2023 Potix Corporation. All Rights Reserved.