|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.ErrorMessage
public class ErrorMessage
Contains the error messages and error codes associated with a specific error. The naming convention may be misleading, but this class does not extend JabberMessage. It is usually used by a JabberMessage when parsing error messages. Pretty much this class is more of a helper class than a message class. Furthermore, because the error message is now rather specific, including the management of the parsing and encoding of xml data, the message is now tied to jdom and is not generic for use for other purposes. If you have an issue with this, then you will need to create your own error message to handle the messages. This message supports the transitional JEP-0086, helping bridge the gap between the old style Jabber error messages to the new XMPP style Jabber Error messages.
Current Implementation: JEP-0086 Version 1.0
Field Summary | |
---|---|
static java.lang.String |
TYPE_AUTH
|
static java.lang.String |
TYPE_CANCEL
|
static java.lang.String |
TYPE_CONTINUE
|
static java.lang.String |
TYPE_MODIFY
|
static java.lang.String |
TYPE_WAIT
|
Constructor Summary | |
---|---|
ErrorMessage(int code,
java.lang.String msg)
Constructs the legacy error message using the specified code and message. |
|
ErrorMessage(java.lang.String condition,
java.lang.String type)
|
|
ErrorMessage(java.lang.String condition,
java.lang.String type,
java.lang.String msg)
|
Method Summary | |
---|---|
static ErrorMessage |
createErrorMessage(Element errorElem)
|
Element |
getApplicationCondition()
This retrieves the application-specified condition if there is one. |
int |
getCode()
|
java.lang.String |
getCondition()
|
java.lang.String |
getMessage()
|
java.lang.String |
getType()
The error type, as specified in the constants in this class. |
void |
setApplicationCondition(Element applicationCondition)
Sets the application condition to be sent along with the error message. |
void |
setCode(int code)
Sets the error code for this error message. |
void |
setCondition(java.lang.String condition)
Set the condition to be used. |
void |
setType(java.lang.String type)
Sets the type to be associated with the condition. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TYPE_AUTH
public static final java.lang.String TYPE_CANCEL
public static final java.lang.String TYPE_CONTINUE
public static final java.lang.String TYPE_MODIFY
public static final java.lang.String TYPE_WAIT
Constructor Detail |
---|
public ErrorMessage(int code, java.lang.String msg)
public ErrorMessage(java.lang.String condition, java.lang.String type)
public ErrorMessage(java.lang.String condition, java.lang.String type, java.lang.String msg)
Method Detail |
---|
public static ErrorMessage createErrorMessage(Element errorElem) throws ParseException
ParseException
public java.lang.String getMessage()
public int getCode()
public java.lang.String getCondition()
public java.lang.String getType()
public Element getApplicationCondition()
public void setApplicationCondition(Element applicationCondition)
public void setCondition(java.lang.String condition)
ErrorCode
public void setType(java.lang.String type)
public void setCode(int code)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |