Package org.apache.guacamole.net
Class DelegatingGuacamoleSocket
- java.lang.Object
- 
- org.apache.guacamole.net.DelegatingGuacamoleSocket
 
- 
- All Implemented Interfaces:
- GuacamoleSocket
 - Direct Known Subclasses:
- ConfiguredGuacamoleSocket,- FailoverGuacamoleSocket,- FilteredGuacamoleSocket
 
 public class DelegatingGuacamoleSocket extends Object implements GuacamoleSocket GuacamoleSocket implementation which simply delegates all function calls to an underlying GuacamoleSocket.
- 
- 
Constructor SummaryConstructors Constructor Description DelegatingGuacamoleSocket(GuacamoleSocket socket)Wraps the given GuacamoleSocket such that all function calls against this DelegatingGuacamoleSocket will be delegated to it.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Releases all resources in use by the connection represented by this GuacamoleSocket.protected GuacamoleSocketgetDelegateSocket()Returns the underlying GuacamoleSocket wrapped by this DelegatingGuacamoleSocket.StringgetProtocol()Returns the name of the protocol to be used.GuacamoleReadergetReader()Returns a GuacamoleReader which can be used to read from the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.GuacamoleWritergetWriter()Returns a GuacamoleWriter which can be used to write to the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.booleanisOpen()Returns whether this GuacamoleSocket is open and can be used for reading and writing.
 
- 
- 
- 
Constructor Detail- 
DelegatingGuacamoleSocketpublic DelegatingGuacamoleSocket(GuacamoleSocket socket) Wraps the given GuacamoleSocket such that all function calls against this DelegatingGuacamoleSocket will be delegated to it.- Parameters:
- socket- The GuacamoleSocket to wrap.
 
 
- 
 - 
Method Detail- 
getDelegateSocketprotected GuacamoleSocket getDelegateSocket() Returns the underlying GuacamoleSocket wrapped by this DelegatingGuacamoleSocket.- Returns:
- The GuacamoleSocket wrapped by this DelegatingGuacamoleSocket.
 
 - 
getProtocolpublic String getProtocol() Description copied from interface:GuacamoleSocketReturns 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. - Specified by:
- getProtocolin interface- GuacamoleSocket
- Returns:
- The name of the protocol to be used, or null if this information is not available.
 
 - 
getReaderpublic GuacamoleReader getReader() Description copied from interface:GuacamoleSocketReturns a GuacamoleReader which can be used to read from the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.- Specified by:
- getReaderin interface- GuacamoleSocket
- Returns:
- A GuacamoleReader which can be used to read from the Guacamole instruction stream.
 
 - 
getWriterpublic GuacamoleWriter getWriter() Description copied from interface:GuacamoleSocketReturns a GuacamoleWriter which can be used to write to the Guacamole instruction stream associated with the connection represented by this GuacamoleSocket.- Specified by:
- getWriterin interface- GuacamoleSocket
- Returns:
- A GuacamoleWriter which can be used to write to the Guacamole instruction stream.
 
 - 
closepublic void close() throws GuacamoleExceptionDescription copied from interface:GuacamoleSocketReleases all resources in use by the connection represented by this GuacamoleSocket.- Specified by:
- closein interface- GuacamoleSocket
- Throws:
- GuacamoleException- If an error occurs while releasing resources.
 
 - 
isOpenpublic boolean isOpen() Description copied from interface:GuacamoleSocketReturns whether this GuacamoleSocket is open and can be used for reading and writing.- Specified by:
- isOpenin interface- GuacamoleSocket
- Returns:
- true if this GuacamoleSocket is open, false otherwise.
 
 
- 
 
-