Package org.apache.guacamole.net
Interface GuacamoleTunnel
- 
- All Known Implementing Classes:
- AbstractGuacamoleTunnel,- DelegatingGuacamoleTunnel,- SimpleGuacamoleTunnel
 
 public interface GuacamoleTunnelProvides a unique identifier and synchronized access to the GuacamoleReader and GuacamoleWriter associated with a GuacamoleSocket.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringINTERNAL_DATA_OPCODEThe Guacamole protocol instruction opcode reserved for arbitrary internal use by tunnel implementations.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description GuacamoleReaderacquireReader()Acquires exclusive read access to the Guacamole instruction stream and returns a GuacamoleReader for reading from that stream.GuacamoleWriteracquireWriter()Acquires exclusive write access to the Guacamole instruction stream and returns a GuacamoleWriter for writing to that stream.voidclose()Release all resources allocated to this GuacamoleTunnel.GuacamoleSocketgetSocket()Returns the GuacamoleSocket used by this GuacamoleTunnel for reading and writing.UUIDgetUUID()Returns the unique identifier associated with this GuacamoleTunnel.booleanhasQueuedReaderThreads()Returns whether there are threads waiting for read access to the Guacamole instruction stream.booleanhasQueuedWriterThreads()Returns whether there are threads waiting for write access to the Guacamole instruction stream.booleanisOpen()Returns whether this GuacamoleTunnel is open, or has been closed.voidreleaseReader()Relinquishes exclusive read access to the Guacamole instruction stream.voidreleaseWriter()Relinquishes exclusive write access to the Guacamole instruction stream.
 
- 
- 
- 
Field Detail- 
INTERNAL_DATA_OPCODEstatic final String INTERNAL_DATA_OPCODE The Guacamole protocol instruction opcode reserved for arbitrary internal use by tunnel implementations. The value of this opcode is guaranteed to be the empty string (""). Tunnel implementations may use this opcode for any purpose. It is currently used by the HTTP tunnel to mark the end of the HTTP response, and by the WebSocket tunnel to transmit the tunnel UUID.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
acquireReaderGuacamoleReader acquireReader() Acquires exclusive read access to the Guacamole instruction stream and returns a GuacamoleReader for reading from that stream.- Returns:
- A GuacamoleReader for reading from the Guacamole instruction stream.
 
 - 
releaseReadervoid releaseReader() Relinquishes exclusive read access to the Guacamole instruction stream. This function should be called whenever a thread finishes using a GuacamoleTunnel's GuacamoleReader.
 - 
hasQueuedReaderThreadsboolean hasQueuedReaderThreads() Returns whether there are threads waiting for read access to the Guacamole instruction stream.- Returns:
- true if threads are waiting for read access the Guacamole instruction stream, false otherwise.
 
 - 
acquireWriterGuacamoleWriter acquireWriter() Acquires exclusive write access to the Guacamole instruction stream and returns a GuacamoleWriter for writing to that stream.- Returns:
- A GuacamoleWriter for writing to the Guacamole instruction stream.
 
 - 
releaseWritervoid releaseWriter() Relinquishes exclusive write access to the Guacamole instruction stream. This function should be called whenever a thread finishes using a GuacamoleTunnel's GuacamoleWriter.
 - 
hasQueuedWriterThreadsboolean hasQueuedWriterThreads() Returns whether there are threads waiting for write access to the Guacamole instruction stream.- Returns:
- true if threads are waiting for write access the Guacamole instruction stream, false otherwise.
 
 - 
getUUIDUUID getUUID() Returns the unique identifier associated with this GuacamoleTunnel.- Returns:
- The unique identifier associated with this GuacamoleTunnel.
 
 - 
getSocketGuacamoleSocket getSocket() Returns the GuacamoleSocket used by this GuacamoleTunnel for reading and writing.- Returns:
- The GuacamoleSocket used by this GuacamoleTunnel.
 
 - 
closevoid close() throws GuacamoleExceptionRelease all resources allocated to this GuacamoleTunnel.- Throws:
- GuacamoleException- if an error occurs while releasing resources.
 
 - 
isOpenboolean isOpen() Returns whether this GuacamoleTunnel is open, or has been closed.- Returns:
- true if this GuacamoleTunnel is open, false if it is closed.
 
 
- 
 
-