public class GuacamoleTunnel extends Object
Constructor and Description |
---|
GuacamoleTunnel(GuacamoleSocket socket)
Creates a new GuacamoleTunnel which synchronizes access to the
Guacamole instruction stream associated with the given GuacamoleSocket.
|
Modifier and Type | Method and Description |
---|---|
GuacamoleReader |
acquireReader()
Acquires exclusive read access to the Guacamole instruction stream
and returns a GuacamoleReader for reading from that stream.
|
GuacamoleWriter |
acquireWriter()
Acquires exclusive write access to the Guacamole instruction stream
and returns a GuacamoleWriter for writing to that stream.
|
void |
close()
Release all resources allocated to this GuacamoleTunnel.
|
GuacamoleSocket |
getSocket()
Returns the GuacamoleSocket used by this GuacamoleTunnel for reading
and writing.
|
UUID |
getUUID()
Returns the unique identifier associated with this GuacamoleTunnel.
|
boolean |
hasQueuedReaderThreads()
Returns whether there are threads waiting for read access to the
Guacamole instruction stream.
|
boolean |
hasQueuedWriterThreads()
Returns whether there are threads waiting for write access to the
Guacamole instruction stream.
|
boolean |
isOpen()
Returns whether this GuacamoleTunnel is open, or has been closed.
|
void |
releaseReader()
Relinquishes exclusive read access to the Guacamole instruction
stream.
|
void |
releaseWriter()
Relinquishes exclusive write access to the Guacamole instruction
stream.
|
public GuacamoleTunnel(GuacamoleSocket socket)
socket
- The GuacamoleSocket to provide synchronized access for.public GuacamoleReader acquireReader()
public void releaseReader()
public boolean hasQueuedReaderThreads()
public GuacamoleWriter acquireWriter()
public void releaseWriter()
public boolean hasQueuedWriterThreads()
public UUID getUUID()
public GuacamoleSocket getSocket()
public void close() throws GuacamoleException
GuacamoleException
- if an error occurs while releasing
resources.public boolean isOpen()
Copyright © 2012. All Rights Reserved.