Package org.jivesoftware.smack.packet
Class AbstractError
- java.lang.Object
-
- org.jivesoftware.smack.packet.AbstractError
-
- Direct Known Subclasses:
SaslNonza.SASLFailure
,StanzaError
,StreamError
public class AbstractError extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractError.Builder<B extends AbstractError.Builder<B>>
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>
descriptiveTexts
protected java.util.List<ExtensionElement>
extensions
protected java.lang.String
textNamespace
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractError(java.util.Map<java.lang.String,java.lang.String> descriptiveTexts)
protected
AbstractError(java.util.Map<java.lang.String,java.lang.String> descriptiveTexts, java.lang.String textNamespace, java.util.List<ExtensionElement> extensions)
protected
AbstractError(java.util.Map<java.lang.String,java.lang.String> descriptiveTexts, java.util.List<ExtensionElement> extensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addDescriptiveTextsAndExtensions(XmlStringBuilder xml)
java.lang.String
getDescriptiveText()
Get the descriptive text of this SASLFailure.java.lang.String
getDescriptiveText(java.lang.String xmllang)
Get the descriptive test of this SASLFailure.<PE extends ExtensionElement>
PEgetExtension(java.lang.String elementName, java.lang.String namespace)
Returns the first stanza extension that matches the specified element name and namespace, ornull
if it doesn't exist.
-
-
-
Field Detail
-
textNamespace
protected final java.lang.String textNamespace
-
descriptiveTexts
protected final java.util.Map<java.lang.String,java.lang.String> descriptiveTexts
-
extensions
protected final java.util.List<ExtensionElement> extensions
-
-
Constructor Detail
-
AbstractError
protected AbstractError(java.util.Map<java.lang.String,java.lang.String> descriptiveTexts)
-
AbstractError
protected AbstractError(java.util.Map<java.lang.String,java.lang.String> descriptiveTexts, java.util.List<ExtensionElement> extensions)
-
AbstractError
protected AbstractError(java.util.Map<java.lang.String,java.lang.String> descriptiveTexts, java.lang.String textNamespace, java.util.List<ExtensionElement> extensions)
-
-
Method Detail
-
getDescriptiveText
public java.lang.String getDescriptiveText()
Get the descriptive text of this SASLFailure.Returns the descriptive text of this SASLFailure in the system default language if possible. May return null.
- Returns:
- the descriptive text or null.
-
getDescriptiveText
public java.lang.String getDescriptiveText(java.lang.String xmllang)
Get the descriptive test of this SASLFailure.Returns the descriptive text of this SASLFailure in the given language. May return null if not available.
- Parameters:
xmllang
- the language.- Returns:
- the descriptive text or null.
-
getExtension
public <PE extends ExtensionElement> PE getExtension(java.lang.String elementName, java.lang.String namespace)
Returns the first stanza extension that matches the specified element name and namespace, ornull
if it doesn't exist.- Type Parameters:
PE
- type of the ExtensionElement.- Parameters:
elementName
- the XML element name of the stanza extension.namespace
- the XML element namespace of the stanza extension.- Returns:
- the extension, or
null
if it doesn't exist.
-
addDescriptiveTextsAndExtensions
protected void addDescriptiveTextsAndExtensions(XmlStringBuilder xml)
-
-