public class DelegatingGuacamoleSocket extends Object implements GuacamoleSocket
Constructor and Description |
---|
DelegatingGuacamoleSocket(GuacamoleSocket socket)
Wraps the given GuacamoleSocket such that all function calls against
this DelegatingGuacamoleSocket will be delegated to it.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases all resources in use by the connection represented by this
GuacamoleSocket.
|
protected GuacamoleSocket |
getDelegateSocket()
Returns the underlying GuacamoleSocket wrapped by this
DelegatingGuacamoleSocket.
|
String |
getProtocol()
Returns the name of the protocol to be used.
|
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.
|
public DelegatingGuacamoleSocket(GuacamoleSocket socket)
socket
- The GuacamoleSocket to wrap.protected GuacamoleSocket getDelegateSocket()
public String getProtocol()
GuacamoleSocket
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.
getProtocol
in interface GuacamoleSocket
public GuacamoleReader getReader()
GuacamoleSocket
getReader
in interface GuacamoleSocket
public GuacamoleWriter getWriter()
GuacamoleSocket
getWriter
in interface GuacamoleSocket
public void close() throws GuacamoleException
GuacamoleSocket
close
in interface GuacamoleSocket
GuacamoleException
- If an error occurs while releasing resources.public boolean isOpen()
GuacamoleSocket
isOpen
in interface GuacamoleSocket
Copyright © 2020. All rights reserved.