org.jabber.jabberbeans.Extension
Class PacketError

java.lang.Object
  |
  +--org.jabber.jabberbeans.XMLData
        |
        +--org.jabber.jabberbeans.Extension.PacketError
All Implemented Interfaces:
Extension, java.io.Serializable

public class PacketError
extends XMLData
implements Extension

PacketError contains packet <error'> tag according to JEP-0086.

See Also:
Serialized Form

Field Summary
protected  java.util.Vector children
          error children (except xmlns='urn:ietf:params:xml:ns:xmpp-stanzas')
protected  java.lang.String code
          Error code on event of an error (type=error).
protected  java.lang.String condition
          XMPP error condition
protected  java.lang.String text
          Extended description of the error.
protected  java.lang.String type
          error type
 
Constructor Summary
PacketError(PacketErrorBuilder builder)
          Creates a new PacketError instance, based on the builder state.
 
Method Summary
 void appendItem(java.lang.StringBuffer retval)
          appendItem converts this packet to XML.
 java.util.Enumeration children()
          returns error children (except xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'), which is in condition field.
 java.util.Vector getChildren()
          returns error children (except xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'), which is in condition field.
 java.lang.String getCode()
          returns the error code.
 java.lang.String getCondition()
          returns the XMPP error condition.
 java.lang.String getText()
          returns the error text.
static java.lang.String getTextForCode(java.lang.String code)
          Returns error text accordin to given error code
 java.lang.String getType()
          returns the error type.
 void setCode(java.lang.String code)
          sets the error code.
 void setText(java.lang.String text)
          sets the error text.
 
Methods inherited from class org.jabber.jabberbeans.XMLData
appendAttrib, appendAttrib, appendChild, appendChild, escapeString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jabber.jabberbeans.Extension.Extension
toString
 

Field Detail

type

protected java.lang.String type
error type


text

protected java.lang.String text
Extended description of the error.


code

protected java.lang.String code
Error code on event of an error (type=error). This is supposed to always hold the numerical value of the error code (which are very close to the HTTP error codes).


condition

protected java.lang.String condition
XMPP error condition


children

protected java.util.Vector children
error children (except xmlns='urn:ietf:params:xml:ns:xmpp-stanzas')

Constructor Detail

PacketError

public PacketError(PacketErrorBuilder builder)
            throws java.lang.InstantiationException
Creates a new PacketError instance, based on the builder state.

Parameters:
builder - an PacketErrorBuilder value
Throws:
java.lang.InstantiationException - if malformed or insufficient data is in the builder.
Method Detail

getType

public java.lang.String getType()
returns the error type.


getText

public java.lang.String getText()
returns the error text.


setText

public void setText(java.lang.String text)
sets the error text.


getCode

public java.lang.String getCode()
returns the error code.


setCode

public void setCode(java.lang.String code)
sets the error code.


getCondition

public java.lang.String getCondition()
returns the XMPP error condition.


getChildren

public java.util.Vector getChildren()
returns error children (except xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'), which is in condition field.


children

public java.util.Enumeration children()
returns error children (except xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'), which is in condition field.


appendItem

public void appendItem(java.lang.StringBuffer retval)
appendItem converts this packet to XML. It then appends it to a StringBuffer.

Specified by:
appendItem in interface Extension
Specified by:
appendItem in class XMLData
Parameters:
retval - The StringBuffer to append to

getTextForCode

public static java.lang.String getTextForCode(java.lang.String code)
Returns error text accordin to given error code