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 Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractError.Builder<B extends AbstractError.Builder<B>>
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>descriptiveTextsprotected List<XmlElement>extensionsprotected StringtextNamespace
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractError(Map<String,String> descriptiveTexts)protectedAbstractError(Map<String,String> descriptiveTexts, String textNamespace, List<XmlElement> extensions)protectedAbstractError(Map<String,String> descriptiveTexts, List<XmlElement> extensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDescriptiveTextsAndExtensions(XmlStringBuilder xml)StringgetDescriptiveText()Get the descriptive text of this SASLFailure.StringgetDescriptiveText(String xmllang)Get the descriptive test of this SASLFailure.<PE extends XmlElement>
PEgetExtension(String elementName, String namespace)Returns the first stanza extension that matches the specified element name and namespace, ornullif it doesn't exist.
-
-
-
Field Detail
-
textNamespace
protected final String textNamespace
-
descriptiveTexts
protected final Map<String,String> descriptiveTexts
-
extensions
protected final List<XmlElement> extensions
-
-
Constructor Detail
-
AbstractError
protected AbstractError(Map<String,String> descriptiveTexts)
-
AbstractError
protected AbstractError(Map<String,String> descriptiveTexts, List<XmlElement> extensions)
-
AbstractError
protected AbstractError(Map<String,String> descriptiveTexts, String textNamespace, List<XmlElement> extensions)
-
-
Method Detail
-
getDescriptiveText
public 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 String getDescriptiveText(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 XmlElement> PE getExtension(String elementName, String namespace)
Returns the first stanza extension that matches the specified element name and namespace, ornullif 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
nullif it doesn't exist.
-
addDescriptiveTextsAndExtensions
protected void addDescriptiveTextsAndExtensions(XmlStringBuilder xml)
-
-