Package org.apache.guacamole.websocket
Class GuacamoleWebSocketTunnelEndpoint
- java.lang.Object
-
- javax.websocket.Endpoint
-
- org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint
-
public abstract class GuacamoleWebSocketTunnelEndpoint extends javax.websocket.Endpoint
A WebSocket implementation of GuacamoleTunnel functionality, compatible with the Guacamole.WebSocketTunnel object included with the JavaScript API. Messages sent/received are simply chunks of the Guacamole protocol instruction stream.
-
-
Constructor Summary
Constructors Constructor Description GuacamoleWebSocketTunnelEndpoint()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract GuacamoleTunnel
createTunnel(javax.websocket.Session session, javax.websocket.EndpointConfig config)
Returns a new tunnel for the given session.void
onClose(javax.websocket.Session session, javax.websocket.CloseReason closeReason)
void
onMessage(String message)
void
onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
-
-
-
Method Detail
-
createTunnel
protected abstract GuacamoleTunnel createTunnel(javax.websocket.Session session, javax.websocket.EndpointConfig config) throws GuacamoleException
Returns a new tunnel for the given session. How this tunnel is created or retrieved is implementation-dependent.- Parameters:
session
- The session associated with the active WebSocket connection.config
- Configuration information associated with the instance of the endpoint created for handling this single connection.- Returns:
- A connected tunnel, or null if no such tunnel exists.
- Throws:
GuacamoleException
- If an error occurs while retrieving the tunnel, or if access to the tunnel is denied.
-
onOpen
public void onOpen(javax.websocket.Session session, javax.websocket.EndpointConfig config)
- Specified by:
onOpen
in classjavax.websocket.Endpoint
-
onMessage
public void onMessage(String message)
-
onClose
public void onClose(javax.websocket.Session session, javax.websocket.CloseReason closeReason)
- Overrides:
onClose
in classjavax.websocket.Endpoint
-
-