Package org.apache.guacamole.net
Class DelegatingGuacamoleTunnel
java.lang.Object
org.apache.guacamole.net.DelegatingGuacamoleTunnel
- All Implemented Interfaces:
GuacamoleTunnel
GuacamoleTunnel implementation which simply delegates all function calls to
an underlying GuacamoleTunnel.
-
Field Summary
Fields inherited from interface org.apache.guacamole.net.GuacamoleTunnel
INTERNAL_DATA_OPCODE -
Constructor Summary
ConstructorsConstructorDescriptionWraps the given tunnel such that all function calls against this tunnel will be delegated to it. -
Method Summary
Modifier and TypeMethodDescriptionAcquires exclusive read access to the Guacamole instruction stream and returns a GuacamoleReader for reading from that stream.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.Returns the GuacamoleSocket used by this GuacamoleTunnel for reading and writing.getUUID()Returns the unique identifier associated with this GuacamoleTunnel.booleanReturns whether there are threads waiting for read access to the Guacamole instruction stream.booleanReturns whether there are threads waiting for write access to the Guacamole instruction stream.booleanisOpen()Returns whether this GuacamoleTunnel is open, or has been closed.voidRelinquishes exclusive read access to the Guacamole instruction stream.voidRelinquishes exclusive write access to the Guacamole instruction stream.
-
Constructor Details
-
DelegatingGuacamoleTunnel
Wraps the given tunnel such that all function calls against this tunnel will be delegated to it.- Parameters:
tunnel- The GuacamoleTunnel to wrap.
-
-
Method Details
-
acquireReader
Description copied from interface:GuacamoleTunnelAcquires exclusive read access to the Guacamole instruction stream and returns a GuacamoleReader for reading from that stream.- Specified by:
acquireReaderin interfaceGuacamoleTunnel- Returns:
- A GuacamoleReader for reading from the Guacamole instruction stream.
-
releaseReader
public void releaseReader()Description copied from interface:GuacamoleTunnelRelinquishes exclusive read access to the Guacamole instruction stream. This function should be called whenever a thread finishes using a GuacamoleTunnel's GuacamoleReader.- Specified by:
releaseReaderin interfaceGuacamoleTunnel
-
hasQueuedReaderThreads
public boolean hasQueuedReaderThreads()Description copied from interface:GuacamoleTunnelReturns whether there are threads waiting for read access to the Guacamole instruction stream.- Specified by:
hasQueuedReaderThreadsin interfaceGuacamoleTunnel- Returns:
- true if threads are waiting for read access the Guacamole instruction stream, false otherwise.
-
acquireWriter
Description copied from interface:GuacamoleTunnelAcquires exclusive write access to the Guacamole instruction stream and returns a GuacamoleWriter for writing to that stream.- Specified by:
acquireWriterin interfaceGuacamoleTunnel- Returns:
- A GuacamoleWriter for writing to the Guacamole instruction stream.
-
releaseWriter
public void releaseWriter()Description copied from interface:GuacamoleTunnelRelinquishes exclusive write access to the Guacamole instruction stream. This function should be called whenever a thread finishes using a GuacamoleTunnel's GuacamoleWriter.- Specified by:
releaseWriterin interfaceGuacamoleTunnel
-
hasQueuedWriterThreads
public boolean hasQueuedWriterThreads()Description copied from interface:GuacamoleTunnelReturns whether there are threads waiting for write access to the Guacamole instruction stream.- Specified by:
hasQueuedWriterThreadsin interfaceGuacamoleTunnel- Returns:
- true if threads are waiting for write access the Guacamole instruction stream, false otherwise.
-
getUUID
Description copied from interface:GuacamoleTunnelReturns the unique identifier associated with this GuacamoleTunnel.- Specified by:
getUUIDin interfaceGuacamoleTunnel- Returns:
- The unique identifier associated with this GuacamoleTunnel.
-
getSocket
Description copied from interface:GuacamoleTunnelReturns the GuacamoleSocket used by this GuacamoleTunnel for reading and writing.- Specified by:
getSocketin interfaceGuacamoleTunnel- Returns:
- The GuacamoleSocket used by this GuacamoleTunnel.
-
close
Description copied from interface:GuacamoleTunnelRelease all resources allocated to this GuacamoleTunnel.- Specified by:
closein interfaceGuacamoleTunnel- Throws:
GuacamoleException- if an error occurs while releasing resources.
-
isOpen
public boolean isOpen()Description copied from interface:GuacamoleTunnelReturns whether this GuacamoleTunnel is open, or has been closed.- Specified by:
isOpenin interfaceGuacamoleTunnel- Returns:
- true if this GuacamoleTunnel is open, false if it is closed.
-