Enum GuacamoleStatus

    • Enum Constant Detail

      • SUCCESS

        public static final GuacamoleStatus SUCCESS
        The operation succeeded.
      • UNSUPPORTED

        public static final GuacamoleStatus UNSUPPORTED
        The requested operation is unsupported.
      • SERVER_ERROR

        public static final GuacamoleStatus SERVER_ERROR
        The operation could not be performed due to an internal failure.
      • SERVER_BUSY

        public static final GuacamoleStatus SERVER_BUSY
        The operation could not be performed as the server is busy.
      • UPSTREAM_TIMEOUT

        public static final GuacamoleStatus UPSTREAM_TIMEOUT
        The operation could not be performed because the upstream server is not responding.
      • UPSTREAM_ERROR

        public static final GuacamoleStatus UPSTREAM_ERROR
        The operation was unsuccessful due to an error or otherwise unexpected condition of the upstream server.
      • RESOURCE_NOT_FOUND

        public static final GuacamoleStatus RESOURCE_NOT_FOUND
        The operation could not be performed as the requested resource does not exist.
      • RESOURCE_CONFLICT

        public static final GuacamoleStatus RESOURCE_CONFLICT
        The operation could not be performed as the requested resource is already in use.
      • RESOURCE_CLOSED

        public static final GuacamoleStatus RESOURCE_CLOSED
        The operation could not be performed as the requested resource is now closed.
      • UPSTREAM_NOT_FOUND

        public static final GuacamoleStatus UPSTREAM_NOT_FOUND
        The operation could not be performed because the upstream server does not appear to exist.
      • UPSTREAM_UNAVAILABLE

        public static final GuacamoleStatus UPSTREAM_UNAVAILABLE
        The operation could not be performed because the upstream server is not available to service the request.
      • SESSION_CONFLICT

        public static final GuacamoleStatus SESSION_CONFLICT
        The session within the upstream server has ended because it conflicted with another session.
      • SESSION_TIMEOUT

        public static final GuacamoleStatus SESSION_TIMEOUT
        The session within the upstream server has ended because it appeared to be inactive.
      • SESSION_CLOSED

        public static final GuacamoleStatus SESSION_CLOSED
        The session within the upstream server has been forcibly terminated.
      • CLIENT_BAD_REQUEST

        public static final GuacamoleStatus CLIENT_BAD_REQUEST
        The operation could not be performed because bad parameters were given.
      • CLIENT_UNAUTHORIZED

        public static final GuacamoleStatus CLIENT_UNAUTHORIZED
        Permission was denied to perform the operation, as the user is not yet authorized (not yet logged in, for example). As HTTP 401 has implications for HTTP-specific authorization schemes, this status continues to map to HTTP 403 ("Forbidden"). To do otherwise would risk unintended effects.
      • CLIENT_FORBIDDEN

        public static final GuacamoleStatus CLIENT_FORBIDDEN
        Permission was denied to perform the operation, and this operation will not be granted even if the user is authorized.
      • CLIENT_TIMEOUT

        public static final GuacamoleStatus CLIENT_TIMEOUT
        The client took too long to respond.
      • CLIENT_OVERRUN

        public static final GuacamoleStatus CLIENT_OVERRUN
        The client sent too much data.
      • CLIENT_BAD_TYPE

        public static final GuacamoleStatus CLIENT_BAD_TYPE
        The client sent data of an unsupported or unexpected type.
      • CLIENT_TOO_MANY

        public static final GuacamoleStatus CLIENT_TOO_MANY
        The operation failed because the current client is already using too many resources.
    • Method Detail

      • values

        public static GuacamoleStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GuacamoleStatus c : GuacamoleStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GuacamoleStatus valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getHttpStatusCode

        public int getHttpStatusCode()
        Returns the most applicable HTTP error code.
        Returns:
        The most applicable HTTP error code.
      • getWebSocketCode

        public int getWebSocketCode()
        Returns the most applicable HTTP error code.
        Returns:
        The most applicable HTTP error code.
      • getGuacamoleStatusCode

        public int getGuacamoleStatusCode()
        Returns the corresponding Guacamole protocol status code.
        Returns:
        The corresponding Guacamole protocol status code.
      • fromGuacamoleStatusCode

        public static GuacamoleStatus fromGuacamoleStatusCode​(int code)
        Returns the GuacamoleStatus corresponding to the given Guacamole protocol status code. If no such GuacamoleStatus is defined, null is returned.
        Parameters:
        code - The Guacamole protocol status code to translate into a GuacamoleStatus.
        Returns:
        The GuacamoleStatus corresponding to the given Guacamole protocol status code, or null if no such GuacamoleStatus is defined.
      • toException

        public abstract GuacamoleException toException​(String message)
        Returns an instance of the GuacamoleException subclass corresponding to this Guacamole protocol status code. All status codes have a corresponding GuacamoleException except for SUCCESS. The returned GuacamoleException will have the provided human-readable message.
        Parameters:
        message - A human readable description of the error that occurred.
        Returns:
        An instance of the GuacamoleException subclass that corresponds to this status code and has the provided human-readable message.
        Throws:
        IllegalStateException - If invoked on SUCCESS, which has no corresponding GuacamoleException.