| java.lang.Object org.xmpp.packet.StreamError
StreamError | public class StreamError (Code) | | A stream error. Stream errors have a condition and they
can optionally include explanation text.
author: Matt Tucker |
Inner Class :public enum Condition | |
Constructor Summary | |
public | StreamError(Condition condition) Construcs a new StreamError with the specified condition. | public | StreamError(Condition condition, String text) Constructs a new StreamError with the specified condition and error text. | public | StreamError(Condition condition, String text, String language) Constructs a new StreamError with the specified condition and error text.
Parameters: condition - the error condition. Parameters: text - the text description of the error. Parameters: language - the language code of the error description (e.g. | public | StreamError(Element element) Constructs a new StreamError using an existing Element. |
Method Summary | |
public Condition | getCondition() Returns the error condition. | public Element | getElement() Returns the DOM4J Element that backs the error. | public String | getText() Returns a text description of the error, or null if there
is no text description. | public String | getTextLanguage() Returns the text description's language code, or null if there
is no language code associated with the description text. | public void | setCondition(Condition condition) Sets the error condition. | public void | setText(String text) Sets the text description of the error. | public void | setText(String text, String language) Sets the text description of the error. | public String | toString() | public String | toXML() Returns the textual XML representation of this stream error. |
StreamError | public StreamError(Condition condition)(Code) | | Construcs a new StreamError with the specified condition.
Parameters: condition - the error condition. |
StreamError | public StreamError(Condition condition, String text)(Code) | | Constructs a new StreamError with the specified condition and error text.
Parameters: condition - the error condition. Parameters: text - the text description of the error. |
StreamError | public StreamError(Condition condition, String text, String language)(Code) | | Constructs a new StreamError with the specified condition and error text.
Parameters: condition - the error condition. Parameters: text - the text description of the error. Parameters: language - the language code of the error description (e.g. "en"). |
StreamError | public StreamError(Element element)(Code) | | Constructs a new StreamError using an existing Element. This is useful
for parsing incoming error Elements into StreamError objects.
Parameters: element - the stream error Element. |
getCondition | public Condition getCondition()(Code) | | Returns the error condition.
the error condition. See Also: Condition |
getElement | public Element getElement()(Code) | | Returns the DOM4J Element that backs the error. The element is the definitive
representation of the error and can be manipulated directly to change
error contents.
the DOM4J Element. |
getText | public String getText()(Code) | | Returns a text description of the error, or null if there
is no text description.
the text description of the error. |
getTextLanguage | public String getTextLanguage()(Code) | | Returns the text description's language code, or null if there
is no language code associated with the description text.
the language code of the text description, if it exists. |
setCondition | public void setCondition(Condition condition)(Code) | | Sets the error condition.
Parameters: condition - the error condition. See Also: Condition |
setText | public void setText(String text)(Code) | | Sets the text description of the error.
Parameters: text - the text description of the error. |
setText | public void setText(String text, String language)(Code) | | Sets the text description of the error. Optionally, a language code
can be specified to indicate the language of the description.
Parameters: text - the text description of the error. Parameters: language - the language code of the description, or null to specifyno language code. |
toXML | public String toXML()(Code) | | Returns the textual XML representation of this stream error.
the textual XML representation of this stream error. |
|
|