Class StanzaError

  • All Implemented Interfaces:
    Element, ExtensionElement, FullyQualifiedElement, NamedElement, XmlLangElement

    public class StanzaError
    extends AbstractError
    implements ExtensionElement
    Represents an XMPP error sub-packet. Typically, a server responds to a request that has problems by sending the stanza back and including an error packet. Each error has a type, error condition as well as as an optional text explanation. Typical errors are:
    XMPP Errors
    XMPP Error ConditionTypeRFC 6120 Section
    bad-requestMODIFY8.3.3.1
    conflictCANCEL8.3.3.2
    feature-not-implementedCANCEL8.3.3.3
    forbiddenAUTH8.3.3.4
    goneCANCEL8.3.3.5
    internal-server-errorWAIT8.3.3.6
    item-not-foundCANCEL8.3.3.7
    jid-malformedMODIFY8.3.3.8
    not-acceptableMODIFY8.3.3.9
    not-allowedCANCEL8.3.3.10
    not-authorizedAUTH8.3.3.11
    policy-violationMODIFY8.3.3.12
    recipient-unavailableWAIT8.3.3.13
    redirectMODIFY8.3.3.14
    registration-requiredAUTH8.3.3.15
    remote-server-not-foundCANCEL8.3.3.16
    remote-server-timeoutWAIT8.3.3.17
    resource-constraintWAIT8.3.3.18
    service-unavailableCANCEL8.3.3.19
    subscription-requiredAUTH8.3.3.20
    undefined-conditionMODIFY8.3.3.21
    unexpected-requestWAIT8.3.3.22
    See Also:
    RFC 6120 - 8.3.2 Syntax: The Syntax of XMPP error stanzas
    • Field Detail

      • ERROR_CONDITION_AND_TEXT_NAMESPACE

        public static final java.lang.String ERROR_CONDITION_AND_TEXT_NAMESPACE
        See Also:
        Constant Field Values
      • NAMESPACE

        @Deprecated
        public static final java.lang.String NAMESPACE
        Deprecated.
        TODO describe me.
        See Also:
        Constant Field Values
      • QNAME

        public static final javax.xml.namespace.QName QNAME
    • Constructor Detail

      • StanzaError

        public StanzaError​(StanzaError.Condition condition,
                           java.lang.String conditionText,
                           java.lang.String errorGenerator,
                           StanzaError.Type type,
                           java.util.Map<java.lang.String,​java.lang.String> descriptiveTexts,
                           java.util.List<ExtensionElement> extensions)
        Creates a new error with the specified type, condition and message. This constructor is used when the condition is not recognized automatically by XMPPError i.e. there is not a defined instance of ErrorCondition or it does not apply the default specification.
        Parameters:
        type - the error type.
        condition - the error condition.
        conditionText - TODO javadoc me please
        errorGenerator - TODO javadoc me please
        descriptiveTexts - TODO javadoc me please
        extensions - list of stanza extensions