public class StanzaError extends AbstractError
| XMPP Error Condition | Type | RFC 6120 Section |
|---|---|---|
| bad-request | MODIFY | 8.3.3.1 |
| conflict | CANCEL | 8.3.3.2 |
| feature-not-implemented | CANCEL | 8.3.3.3 |
| forbidden | AUTH | 8.3.3.4 |
| gone | CANCEL | 8.3.3.5 |
| internal-server-error | WAIT | 8.3.3.6 |
| item-not-found | CANCEL | 8.3.3.7 |
| jid-malformed | MODIFY | 8.3.3.8 |
| not-acceptable | MODIFY | 8.3.3.9 |
| not-allowed | CANCEL | 8.3.3.10 |
| not-authorized | AUTH | 8.3.3.11 |
| policy-violation | MODIFY | 8.3.3.12 |
| recipient-unavailable | WAIT | 8.3.3.13 |
| redirect | MODIFY | 8.3.3.14 |
| registration-required | AUTH | 8.3.3.15 |
| remote-server-not-found | CANCEL | 8.3.3.16 |
| remote-server-timeout | WAIT | 8.3.3.17 |
| resource-constraint | WAIT | 8.3.3.18 |
| service-unavailable | CANCEL | 8.3.3.19 |
| subscription-required | AUTH | 8.3.3.20 |
| undefined-condition | MODIFY | 8.3.3.21 |
| unexpected-request | WAIT | 8.3.3.22 |
| Modifier and Type | Class and Description |
|---|---|
static class |
StanzaError.Builder |
static class |
StanzaError.Condition |
static class |
StanzaError.Type
A class to represent the type of the Error.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ERROR |
static java.lang.String |
NAMESPACE |
descriptiveTexts, extensions, textNamespace| Constructor and Description |
|---|
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,
Stanza stanza)
Creates a new error with the specified type, condition and message.
|
| Modifier and Type | Method and Description |
|---|---|
static StanzaError.Builder |
from(StanzaError.Condition condition,
java.lang.String descriptiveText) |
static StanzaError.Builder |
getBuilder() |
static StanzaError.Builder |
getBuilder(StanzaError.Condition condition) |
static StanzaError.Builder |
getBuilder(StanzaError xmppError) |
StanzaError.Condition |
getCondition()
Returns the error condition.
|
java.lang.String |
getConditionText() |
java.lang.String |
getErrorGenerator() |
Stanza |
getStanza()
Get the stanza carrying the XMPP error.
|
StanzaError.Type |
getType()
Returns the error type.
|
java.lang.String |
toString() |
XmlStringBuilder |
toXML()
Returns the error as XML.
|
addDescriptiveTextsAndExtensions, getDescriptiveText, getDescriptiveText, getExtensionpublic static final java.lang.String NAMESPACE
public static final java.lang.String ERROR
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, Stanza stanza)
type - the error type.condition - the error condition.conditionText - errorGenerator - descriptiveTexts - extensions - list of stanza extensionsstanza - the stanza carrying this XMPP error.public StanzaError.Condition getCondition()
public StanzaError.Type getType()
public java.lang.String getErrorGenerator()
public java.lang.String getConditionText()
public Stanza getStanza()
public java.lang.String toString()
toString in class java.lang.Objectpublic XmlStringBuilder toXML()
public static StanzaError.Builder from(StanzaError.Condition condition, java.lang.String descriptiveText)
public static StanzaError.Builder getBuilder()
public static StanzaError.Builder getBuilder(StanzaError.Condition condition)
public static StanzaError.Builder getBuilder(StanzaError xmppError)