Package org.apache.guacamole.net
Class InetGuacamoleSocket
- java.lang.Object
-
- org.apache.guacamole.net.InetGuacamoleSocket
-
- All Implemented Interfaces:
GuacamoleSocket
public class InetGuacamoleSocket extends Object implements GuacamoleSocket
Provides abstract socket-like access to a Guacamole connection over a given hostname and port.
-
-
Constructor Summary
Constructors Constructor Description InetGuacamoleSocket(String hostname, int port)
Creates a new InetGuacamoleSocket which reads and writes instructions to the Guacamole instruction stream of the Guacamole proxy server running at the given hostname and port.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Releases all resources in use by the connection represented by this GuacamoleSocket.GuacamoleReader
getReader()
Returns a GuacamoleReader which can be used to read from the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.GuacamoleWriter
getWriter()
Returns a GuacamoleWriter which can be used to write to the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.boolean
isOpen()
Returns whether this GuacamoleSocket is open and can be used for reading and writing.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.guacamole.net.GuacamoleSocket
getProtocol
-
-
-
-
Constructor Detail
-
InetGuacamoleSocket
public InetGuacamoleSocket(String hostname, int port) throws GuacamoleException
Creates a new InetGuacamoleSocket which reads and writes instructions to the Guacamole instruction stream of the Guacamole proxy server running at the given hostname and port.- Parameters:
hostname
- The hostname of the Guacamole proxy server to connect to.port
- The port of the Guacamole proxy server to connect to.- Throws:
GuacamoleException
- If an error occurs while connecting to the Guacamole proxy server.
-
-
Method Detail
-
close
public void close() throws GuacamoleException
Description copied from interface:GuacamoleSocket
Releases all resources in use by the connection represented by this GuacamoleSocket.- Specified by:
close
in interfaceGuacamoleSocket
- Throws:
GuacamoleException
- If an error occurs while releasing resources.
-
getReader
public GuacamoleReader getReader()
Description copied from interface:GuacamoleSocket
Returns a GuacamoleReader which can be used to read from the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.- Specified by:
getReader
in interfaceGuacamoleSocket
- Returns:
- A GuacamoleReader which can be used to read from the Guacamole instruction stream.
-
getWriter
public GuacamoleWriter getWriter()
Description copied from interface:GuacamoleSocket
Returns a GuacamoleWriter which can be used to write to the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.- Specified by:
getWriter
in interfaceGuacamoleSocket
- Returns:
- A GuacamoleWriter which can be used to write to the Guacamole instruction stream.
-
isOpen
public boolean isOpen()
Description copied from interface:GuacamoleSocket
Returns whether this GuacamoleSocket is open and can be used for reading and writing.- Specified by:
isOpen
in interfaceGuacamoleSocket
- Returns:
- true if this GuacamoleSocket is open, false otherwise.
-
-