Class Condition

    • Field Detail

      • BAD_REQUEST

        public static final Condition BAD_REQUEST
        The implementation of the <bad-request/> stanza error.

        8.3.3.1. bad-request

        The sender has sent a stanza containing XML that does not conform to the appropriate schema or that cannot be processed (e.g., an IQ stanza that includes an unrecognized value of the 'type' attribute, or an element that is qualified by a recognized namespace but that violates the defined syntax for the element); the associated error type SHOULD be "modify".

      • CONFLICT

        public static final Condition CONFLICT
        The implementation of the <conflict/> stanza error.

        8.3.3.2. conflict

        Access cannot be granted because an existing resource exists with the same name or address; the associated error type SHOULD be "cancel".

      • FEATURE_NOT_IMPLEMENTED

        public static final Condition FEATURE_NOT_IMPLEMENTED
        The implementation of the <feature-not-implemented/> stanza error.

        8.3.3.3. feature-not-implemented

        The feature represented in the XML stanza is not implemented by the intended recipient or an intermediate server and therefore the stanza cannot be processed (e.g., the entity understands the namespace but does not recognize the element name); the associated error type SHOULD be "cancel" or "modify".

      • FORBIDDEN

        public static final Condition FORBIDDEN
        The implementation of the <forbidden/> stanza error.

        8.3.3.4. forbidden

        The requesting entity does not possess the necessary permissions to perform an action that only certain authorized roles or individuals are allowed to complete (i.e., it typically relates to authorization rather than authentication); the associated error type SHOULD be "auth".

      • INTERNAL_SERVER_ERROR

        public static final Condition INTERNAL_SERVER_ERROR
        The implementation of the <internal-server-error/> stanza error.

        8.3.3.6. internal-server-error

        The server has experienced a misconfiguration or other internal error that prevents it from processing the stanza; the associated error type SHOULD be "cancel".

      • ITEM_NOT_FOUND

        public static final Condition ITEM_NOT_FOUND
        The implementation of the <item-not-found/> stanza error.

        8.3.3.7. item-not-found

        The addressed JID or item requested cannot be found; the associated error type SHOULD be "cancel".

      • JID_MALFORMED

        public static final Condition JID_MALFORMED
        The implementation of the <jid-malformed/> stanza error.

        8.3.3.8. jid-malformed

        The sending entity has provided (e.g., during resource binding) or communicated (e.g., in the 'to' address of a stanza) an XMPP address or aspect thereof that violates the rules defined in [XMPP-ADDR]; the associated error type SHOULD be "modify".

      • NOT_ACCEPTABLE

        public static final Condition NOT_ACCEPTABLE
        The implementation of the <not-acceptable/> stanza error.

        8.3.3.9. not-acceptable

        The recipient or server understands the request but cannot process it because the request does not meet criteria defined by the recipient or server (e.g., a request to subscribe to information that does not simultaneously include configuration parameters needed by the recipient); the associated error type SHOULD be "modify".

      • NOT_ALLOWED

        public static final Condition NOT_ALLOWED
        The implementation of the <not-allowed/> stanza error.

        8.3.3.10. not-allowed

        The recipient or server does not allow any entity to perform the action (e.g., sending to entities at a blacklisted domain); the associated error type SHOULD be "cancel".

      • NOT_AUTHORIZED

        public static final Condition NOT_AUTHORIZED
        The implementation of the <not-authorized/> stanza error.

        8.3.3.11. not-authorized

        The sender needs to provide credentials before being allowed to perform the action, or has provided improper credentials (the name "not-authorized", which was borrowed from the "401 Unauthorized" error of [HTTP], might lead the reader to think that this condition relates to authorization, but instead it is typically used in relation to authentication); the associated error type SHOULD be "auth".

      • POLICY_VIOLATION

        public static final Condition POLICY_VIOLATION
        The implementation of the <policy-violation/> stanza error.

        8.3.3.12. policy-violation

        The entity has violated some local service policy (e.g., a message contains words that are prohibited by the service) and the server MAY choose to specify the policy in the <text/> element or in an application-specific condition element; the associated error type SHOULD be "modify" or "wait" depending on the policy being violated.

      • RECIPIENT_UNAVAILABLE

        public static final Condition RECIPIENT_UNAVAILABLE
        The implementation of the <recipient-unavailable/> stanza error.

        8.3.3.13. recipient-unavailable

        The intended recipient is temporarily unavailable, undergoing maintenance, etc.; the associated error type SHOULD be "wait".

      • REGISTRATION_REQUIRED

        public static final Condition REGISTRATION_REQUIRED
        The implementation of the <registration-required/> stanza error.

        8.3.3.15. registration-required

        The requesting entity is not authorized to access the requested service because prior registration is necessary (examples of prior registration include members-only rooms in XMPP multi-user chat [XEP-0045] and gateways to non-XMPP instant messaging services, which traditionally required registration in order to use the gateway [XEP-0100]); the associated error type SHOULD be "auth".

      • REMOTE_SERVER_NOT_FOUND

        public static final Condition REMOTE_SERVER_NOT_FOUND
        The implementation of the <remote-server-not-found/> stanza error.

        8.3.3.16. remote-server-not-found

        A remote server or service specified as part or all of the JID of the intended recipient does not exist or cannot be resolved (e.g., there is no _xmpp-server._tcp DNS SRV record, the A or AAAA fallback resolution fails, or A/AAAA lookups succeed but there is no response on the IANA-registered port 5269); the associated error type SHOULD be "cancel".

      • REMOTE_SERVER_TIMEOUT

        public static final Condition REMOTE_SERVER_TIMEOUT
        The implementation of the <remote-server-timeout/> stanza error.

        8.3.3.17. remote-server-timeout

        A remote server or service specified as part or all of the JID of the intended recipient (or needed to fulfill a request) was resolved but communications could not be established within a reasonable amount of time (e.g., an XML stream cannot be established at the resolved IP address and port, or an XML stream can be established but stream negotiation fails because of problems with TLS, SASL, Server Dialback, etc.); the associated error type SHOULD be "wait" (unless the error is of a more permanent nature, e.g., the remote server is found but it cannot be authenticated or it violates security policies).

      • RESOURCE_CONSTRAINT

        public static final Condition RESOURCE_CONSTRAINT
        The implementation of the <resource-constraint/> stanza error.

        8.3.3.18. resource-constraint

        The server or recipient is busy or lacks the system resources necessary to service the request; the associated error type SHOULD be "wait".

      • SERVICE_UNAVAILABLE

        public static final Condition SERVICE_UNAVAILABLE
        The implementation of the <service-unavailable/> stanza error.

        8.3.3.19. service-unavailable

        The server or recipient does not currently provide the requested service; the associated error type SHOULD be "cancel".

      • SUBSCRIPTION_REQUIRED

        public static final Condition SUBSCRIPTION_REQUIRED
        The implementation of the <subscription-required/> stanza error.

        8.3.3.20. subscription-required

        The requesting entity is not authorized to access the requested service because a prior subscription is necessary (examples of prior subscription include authorization to receive presence information as defined in [XMPP-IM] and opt-in data feeds for XMPP publish-subscribe as defined in [XEP-0060]); the associated error type SHOULD be "auth".

      • UNDEFINED_CONDITION

        public static final Condition UNDEFINED_CONDITION
        The implementation of the <undefined-condition/> stanza error.

        8.3.3.21. undefined-condition

        The error condition is not one of those defined by the other conditions in this list; any error type can be associated with this condition, and it SHOULD NOT be used except in conjunction with an application-specific condition.

      • UNEXPECTED_REQUEST

        public static final Condition UNEXPECTED_REQUEST
        The implementation of the <unexpected-request/> stanza error.

        8.3.3.22. unexpected-request

        The recipient or server understood the request but was not expecting it at this time (e.g., the request was out of order); the associated error type SHOULD be "wait" or "modify".

    • Method Detail

      • getErrorTypeByCondition

        public static StanzaError.Type getErrorTypeByCondition​(Condition condition)
        Gets the associated stanza error type for a condition.
        Parameters:
        condition - The condition.
        Returns:
        The associated stanza error type.
      • redirect

        public static Redirect redirect​(String alternateAddress)
        Creates a <redirect/> stanza error with an alternate address.

        8.3.3.14. redirect

        The recipient or server is redirecting requests for this information to another entity, typically in a temporary fashion (as opposed to the <gone/> error condition, which is used for permanent addressing failures); the associated error type SHOULD be "modify" and the error stanza SHOULD contain the alternate address in the XML character data of the <redirect/> element (which MUST be a URI or IRI with which the sender can communicate, typically an XMPP IRI as specified in [XMPP-URI]).

        Parameters:
        alternateAddress - The new address.
        Returns:
        The error.
      • gone

        public static Gone gone()
        Creates a <gone/> stanza error.

        8.3.3.5. gone

        The recipient or server can no longer be contacted at this address, typically on a permanent basis (as opposed to the <redirect/> error condition, which is used for temporary addressing failures); the associated error type SHOULD be "cancel" and the error stanza SHOULD include a new address (if available) as the XML character data of the <gone/> element (which MUST be a Uniform Resource Identifier [URI] or Internationalized Resource Identifier [IRI] at which the entity can be contacted, typically an XMPP IRI as specified in [XMPP-URI]).

        Returns:
        The error.
      • gone

        public static Gone gone​(String newAddress)
        Creates a <gone/> stanza error with a new address.
        Parameters:
        newAddress - The new address.
        Returns:
        The error.