Package org.apache.guacamole.protocol
Class GuacamoleInstruction
- java.lang.Object
-
- org.apache.guacamole.protocol.GuacamoleInstruction
-
public class GuacamoleInstruction extends Object
An abstract representation of a Guacamole instruction, as defined by the Guacamole protocol.
-
-
Constructor Summary
Constructors Constructor Description GuacamoleInstruction(String opcode, String... args)
Creates a new GuacamoleInstruction having the given Operation and list of arguments values.GuacamoleInstruction(String opcode, List<String> args)
Creates a new GuacamoleInstruction having the given Operation and list of arguments values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getArgs()
Returns a List of all argument values specified for this GuacamoleInstruction.String
getOpcode()
Returns the opcode associated with this GuacamoleInstruction.String
toString()
Returns this GuacamoleInstruction in the form it would be sent over the Guacamole protocol.
-
-
-
Constructor Detail
-
GuacamoleInstruction
public GuacamoleInstruction(String opcode, String... args)
Creates a new GuacamoleInstruction having the given Operation and list of arguments values.- Parameters:
opcode
- The opcode of the instruction to create.args
- The list of argument values to provide in the new instruction if any.
-
GuacamoleInstruction
public GuacamoleInstruction(String opcode, List<String> args)
Creates a new GuacamoleInstruction having the given Operation and list of arguments values. The list given will be used to back the internal list of arguments and the list returned by getArgs().- Parameters:
opcode
- The opcode of the instruction to create.args
- The list of argument values to provide in the new instruction if any.
-
-
Method Detail
-
getOpcode
public String getOpcode()
Returns the opcode associated with this GuacamoleInstruction.- Returns:
- The opcode associated with this GuacamoleInstruction.
-
getArgs
public List<String> getArgs()
Returns a List of all argument values specified for this GuacamoleInstruction. Note that the List returned is immutable. Attempts to modify the list will result in exceptions.- Returns:
- A List of all argument values specified for this GuacamoleInstruction.
-
-