Package org.apache.guacamole.protocol
Class GuacamoleProtocolVersion
java.lang.Object
org.apache.guacamole.protocol.GuacamoleProtocolVersion
Representation of a Guacamole protocol version. Convenience methods are
provided for parsing and comparing versions, as is necessary when
determining the version of the Guacamole protocol common to guacd and a
client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GuacamoleProtocolVersion
The most recent version of the Guacamole protocol at the time this version of GuacamoleProtocolVersion was built.static final GuacamoleProtocolVersion
Protocol version 1.0.0 and older.static final GuacamoleProtocolVersion
Protocol version 1.1.0, which introduces Client-Server version detection, arbitrary handshake instruction order, and support for passing the client timezone to the server during the handshake.static final GuacamoleProtocolVersion
Protocol version 1.3.0, which introduces the "required" instruction allowing the server to explicitly request connection parameters from the client.static final GuacamoleProtocolVersion
Protocol version 1.5.0, which introduces the "msg" instruction, allowing the server to send message notifications that will be displayed on the client. -
Constructor Summary
ConstructorsConstructorDescriptionGuacamoleProtocolVersion
(int major, int minor, int patch) Generate a new GuacamoleProtocolVersion object with the given major version, minor version, and patch version. -
Method Summary
Modifier and TypeMethodDescriptionboolean
atLeast
(GuacamoleProtocolVersion otherVersion) Returns whether this GuacamoleProtocolVersion is at least as recent as (greater than or equal to) the given version.boolean
int
getMajor()
Return the major version component of the protocol version.int
getMinor()
Return the minor version component of the protocol version.int
getPatch()
Return the patch version component of the protocol version.int
hashCode()
static GuacamoleProtocolVersion
parseVersion
(String version) Parse the String format of the version provided and return the the enum value matching that version.toString()
-
Field Details
-
VERSION_1_0_0
Protocol version 1.0.0 and older. Any client that doesn't explicitly set the protocol version will negotiate down to this protocol version. This requires that handshake instructions be ordered correctly, and lacks support for certain protocol-related features introduced in later versions. -
VERSION_1_1_0
Protocol version 1.1.0, which introduces Client-Server version detection, arbitrary handshake instruction order, and support for passing the client timezone to the server during the handshake. -
VERSION_1_3_0
Protocol version 1.3.0, which introduces the "required" instruction allowing the server to explicitly request connection parameters from the client. -
VERSION_1_5_0
Protocol version 1.5.0, which introduces the "msg" instruction, allowing the server to send message notifications that will be displayed on the client. The version also adds support for the "name" handshake instruction, allowing guacd to store the name of the user who is accessing the connection. -
LATEST
The most recent version of the Guacamole protocol at the time this version of GuacamoleProtocolVersion was built.
-
-
Constructor Details
-
GuacamoleProtocolVersion
public GuacamoleProtocolVersion(int major, int minor, int patch) Generate a new GuacamoleProtocolVersion object with the given major version, minor version, and patch version.- Parameters:
major
- The integer representation of the major version component.minor
- The integer representation of the minor version component.patch
- The integer representation of the patch version component.
-
-
Method Details
-
getMajor
public int getMajor()Return the major version component of the protocol version.- Returns:
- The integer major version component.
-
getMinor
public int getMinor()Return the minor version component of the protocol version.- Returns:
- The integer minor version component.
-
getPatch
public int getPatch()Return the patch version component of the protocol version.- Returns:
- The integer patch version component.
-
atLeast
Returns whether this GuacamoleProtocolVersion is at least as recent as (greater than or equal to) the given version.- Parameters:
otherVersion
- The version to which this GuacamoleProtocolVersion should be compared.- Returns:
- true if this object is at least as recent as the given version, false if the given version is newer.
-
parseVersion
Parse the String format of the version provided and return the the enum value matching that version. If no value is provided, return null.- Parameters:
version
- The String format of the version to parse.- Returns:
- The enum value that matches the specified version, VERSION_1_0_0 if no match is found, or null if no comparison version is provided.
-
hashCode
public int hashCode() -
equals
-
toString
-