Package rocks.xmpp.core.stanza.model
Class StanzaErrorException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- rocks.xmpp.core.XmppException
-
- rocks.xmpp.core.stanza.model.StanzaErrorException
-
- All Implemented Interfaces:
Serializable
public final class StanzaErrorException extends XmppException
A stanza exception represents a stanza error. It should be thrown, if a request (e.g. an IQ stanza) returned a stanza error.- See Also:
- 8.3. Stanza Errors, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StanzaErrorException(Stanza stanza)
Constructs a stanza exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Condition
getCondition()
Gets the defined error condition.StanzaError
getError()
Gets the stanza error, i.e. the<error/>
element.Stanza
getStanza()
Gets the stanza, which includes the error.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
StanzaErrorException
public StanzaErrorException(Stanza stanza)
Constructs a stanza exception.- Parameters:
stanza
- The underlying stanza.
-
-
Method Detail
-
getStanza
public final Stanza getStanza()
Gets the stanza, which includes the error.- Returns:
- The stanza.
-
getError
public final StanzaError getError()
Gets the stanza error, i.e. the<error/>
element.- Returns:
- The stanza error.
- See Also:
- 8.3. Stanza Errors
-
getCondition
public final Condition getCondition()
Gets the defined error condition. If the condition is unknown,Condition.UNDEFINED_CONDITION
is returned. This is a shortcut forgetError().getCondition()
.- Returns:
- The error condition.
- See Also:
- 8.3.3. Defined Conditions
-
-