public class StanzaError extends AbstractError implements ExtensionElement
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 String |
ERROR |
static String |
ERROR_CONDITION_AND_TEXT_NAMESPACE |
static String |
NAMESPACE
Deprecated.
|
descriptiveTexts, extensions, textNamespace
Constructor and Description |
---|
StanzaError(StanzaError.Condition condition,
String conditionText,
String errorGenerator,
StanzaError.Type type,
Map<String,String> descriptiveTexts,
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,
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.
|
String |
getConditionText() |
String |
getElementName()
Returns the root element name.
|
String |
getErrorGenerator() |
String |
getNamespace()
Returns the root element XML namespace.
|
Stanza |
getStanza()
Get the stanza carrying the XMPP error.
|
StanzaError.Type |
getType()
Returns the error type.
|
String |
toString() |
XmlStringBuilder |
toXML()
Returns the error as XML.
|
XmlStringBuilder |
toXML(String enclosingNamespace)
Returns the XML representation of this Element.
|
addDescriptiveTextsAndExtensions, getDescriptiveText, getDescriptiveText, getExtension
public static final String ERROR_CONDITION_AND_TEXT_NAMESPACE
@Deprecated public static final String NAMESPACE
public static final String ERROR
public StanzaError(StanzaError.Condition condition, String conditionText, String errorGenerator, StanzaError.Type type, Map<String,String> descriptiveTexts, 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 String getErrorGenerator()
public String getConditionText()
public Stanza getStanza()
public String getElementName()
NamedElement
getElementName
in interface NamedElement
public String getNamespace()
ExtensionElement
getNamespace
in interface ExtensionElement
public XmlStringBuilder toXML()
public XmlStringBuilder toXML(String enclosingNamespace)
Element
public static StanzaError.Builder from(StanzaError.Condition condition, String descriptiveText)
public static StanzaError.Builder getBuilder()
public static StanzaError.Builder getBuilder(StanzaError.Condition condition)
public static StanzaError.Builder getBuilder(StanzaError xmppError)