public class MonitoringGuacamoleReader extends Object implements GuacamoleReader
Constructor and Description |
---|
MonitoringGuacamoleReader(ClipboardState clipboard,
GuacamoleReader reader)
Creates a new MonitoringGuacamoleReader which watches the instructions
read by the given GuacamoleReader, firing events when specific
instructions are seen.
|
Modifier and Type | Method and Description |
---|---|
boolean |
available()
Returns whether instruction data is available for reading.
|
char[] |
read()
Reads at least one complete Guacamole instruction, returning a buffer
containing one or more complete Guacamole instructions and no
incomplete Guacamole instructions.
|
GuacamoleInstruction |
readInstruction()
Reads exactly one complete Guacamole instruction and returns the fully
parsed instruction.
|
public MonitoringGuacamoleReader(ClipboardState clipboard, GuacamoleReader reader)
clipboard
- The clipboard state to maintain.reader
- The reader to observe.public boolean available() throws GuacamoleException
GuacamoleReader
available
in interface GuacamoleReader
GuacamoleException
- If an error occurs while checking for
available data.public char[] read() throws GuacamoleException
GuacamoleReader
read
in interface GuacamoleReader
GuacamoleException
- If an error occurs while reading from the
stream.public GuacamoleInstruction readInstruction() throws GuacamoleException
GuacamoleReader
readInstruction
in interface GuacamoleReader
GuacamoleException
- If an error occurs while reading from the
stream, or if the instruction cannot be
parsed.Copyright © 2016. All rights reserved.