Class 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 Detail

      • GuacamoleWebSocketTunnelEndpoint

        public GuacamoleWebSocketTunnelEndpoint()
    • 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 class javax.websocket.Endpoint
      • onMessage

        public void onMessage​(String message)
      • onClose

        public void onClose​(javax.websocket.Session session,
                            javax.websocket.CloseReason closeReason)
        Overrides:
        onClose in class javax.websocket.Endpoint