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 classAbstractError.Builder<B extends AbstractError.Builder<B>>
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>descriptiveTextsprotected java.util.List<ExtensionElement>extensionsprotected java.lang.StringtextNamespace
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractError(java.util.Map<java.lang.String,java.lang.String> descriptiveTexts)protectedAbstractError(java.util.Map<java.lang.String,java.lang.String> descriptiveTexts, java.lang.String textNamespace, java.util.List<ExtensionElement> extensions)protectedAbstractError(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 voidaddDescriptiveTextsAndExtensions(XmlStringBuilder xml)java.lang.StringgetDescriptiveText()Get the descriptive text of this SASLFailure.java.lang.StringgetDescriptiveText(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, ornullif 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, 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)
-
-