Class GuacamoleException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.guacamole.GuacamoleException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GuacamoleClientException, GuacamoleServerException, GuacamoleUpstreamException

public class GuacamoleException extends Exception
A generic exception thrown when parts of the Guacamole API encounter errors.
See Also:
  • Constructor Details

    • GuacamoleException

      public GuacamoleException(String message, Throwable cause)
      Creates a new GuacamoleException with the given message and cause.
      Parameters:
      message - A human readable description of the exception that occurred.
      cause - The cause of this exception.
    • GuacamoleException

      public GuacamoleException(String message)
      Creates a new GuacamoleException with the given message.
      Parameters:
      message - A human readable description of the exception that occurred.
    • GuacamoleException

      public GuacamoleException(Throwable cause)
      Creates a new GuacamoleException with the given cause.
      Parameters:
      cause - The cause of this exception.
  • Method Details

    • getStatus

      public GuacamoleStatus getStatus()
      Returns the Guacamole status associated with this exception. This status can then be easily translated into an HTTP error code or Guacamole protocol error code.
      Returns:
      The corresponding Guacamole status.
    • getHttpStatusCode

      public int getHttpStatusCode()
      Returns the most applicable HTTP status code that can be associated with this exception.
      Returns:
      An integer representing the most applicable HTTP status code associated with this exception.
    • getWebSocketCode

      public int getWebSocketCode()
      Returns the most applicable WebSocket status code that can be associated with this exception.
      Returns:
      An integer representing the most applicable WebSocket status code associated with this exception.