Interface GuacamoleSocket

All Known Implementing Classes:
ConfiguredGuacamoleSocket, DelegatingGuacamoleSocket, FailoverGuacamoleSocket, FilteredGuacamoleSocket, InetGuacamoleSocket, SSLGuacamoleSocket

public interface GuacamoleSocket
Provides abstract socket-like access to a Guacamole connection.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Releases all resources in use by the connection represented by this GuacamoleSocket.
    default String
    Returns the name of the protocol to be used.
    Returns a GuacamoleReader which can be used to read from the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.
    Returns a GuacamoleWriter which can be used to write to the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.
    boolean
    Returns whether this GuacamoleSocket is open and can be used for reading and writing.
  • Method Details

    • getProtocol

      default String getProtocol()
      Returns the name of the protocol to be used. If the protocol is not known or the implementation refuses to reveal the underlying protocol, null is returned.

      Implementations should aim to expose the name of the underlying protocol, such that protocol-specific responses like the "required" and "argv" instructions can be handled correctly by code consuming the GuacamoleSocket.

      Returns:
      The name of the protocol to be used, or null if this information is not available.
    • getReader

      GuacamoleReader getReader()
      Returns a GuacamoleReader which can be used to read from the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.
      Returns:
      A GuacamoleReader which can be used to read from the Guacamole instruction stream.
    • getWriter

      GuacamoleWriter getWriter()
      Returns a GuacamoleWriter which can be used to write to the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.
      Returns:
      A GuacamoleWriter which can be used to write to the Guacamole instruction stream.
    • close

      void close() throws GuacamoleException
      Releases all resources in use by the connection represented by this GuacamoleSocket.
      Throws:
      GuacamoleException - If an error occurs while releasing resources.
    • isOpen

      boolean isOpen()
      Returns whether this GuacamoleSocket is open and can be used for reading and writing.
      Returns:
      true if this GuacamoleSocket is open, false otherwise.