|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.realtime.xmpp.types.XmppError
Contains the standard Jabber error codes. Use equals() to determine if two errors are equal.
Field Summary | |
static XmppError |
BAD_REQUEST
Code 400 is used to inform a sender that a request could not be understood by the recipient because it cannot be understood. |
static XmppError |
CONFLICT
Code 409 is returned when there is a conflict between two resources, e.g., if a user attempts to join a groupchat room but someone else with the same nickname is already in the room. |
static XmppError |
FORBIDDEN
Code 403 is used to inform an entity that its request was understood but that the recipient is refusing to fulfill it, e.g., if a node attempts to set information (e.g., preferences or profile information) associated with another node. |
static XmppError |
INTERNAL_SERVER_ERROR
Code 500 is used when a host or service encounters an unexpected condition which prevents it from handling an XML chunk from a sender, e.g., if an authentication request is not handled by a host because the password could not be retrieved or if password storage fails when a node attempts to register with a host. |
protected static XmppError[] |
m_errors
All our known error codes. |
protected int |
m_nCode
The error code. |
protected java.lang.String |
m_sName
The name of the error. |
static XmppError |
NOT_ACCEPTABLE
Code 406 is used when an XML chunk is for some reason not acceptable to a host or other entity. |
static XmppError |
NOT_ALLOWED
Code 405 is used when the action requested is not allowed for the JID identified by the 'from' address, e.g., if a node attempts to set the time or version of a host. |
static XmppError |
NOT_FOUND
Code 404 is used to inform a sender that no recipient was found matching the JID to which an XML chunk was sent, e.g., if a sender has attempted to send a message to a JID that does not exist. |
static XmppError |
NOT_IMPLEMENTED
Code 501 is used when the recipient does not support the functionality being requested by a sender, e.g., if a node sends an authentication request that does not contain the elements defined by at least one of the accepted authentication methods or when a node attempts to register with a host that does not allow registration. |
static XmppError |
PAYMENT_REQUIRED
Code 402 is being reserved for future use and is not in use at this time. |
static XmppError |
REDIRECT
Whereas the HTTP spec contains eight different codes for redirection, XMPP contains only one (which is intended to stand for any redirection error). |
static XmppError |
REGISTRATION_REQUIRED
Code 407 is used when a message or request is sent to a service that requires prior registration, e.g., if a node attempts to send a message through a gateway to a foreign messaging system without having first registered with that gateway. |
static XmppError |
REMOTE_SERVER_ERROR
Code 502 is used when delivery of an XML chunk fails because of an inability to reach the intended remote host or service. |
static XmppError |
REMOTE_SERVER_TIMEOUT
Code 504 is used when attempts to contact a remote host timeout, e.g., if an incorrect hostname is specified. |
static XmppError |
REQUEST_TIMEOUT
Code 408 is returned when a recipient does not produce a response within the time that the sender was prepared to wait. |
static XmppError |
SERVICE_UNAVAILABLE
Code 503 is used when a sender requests a service that a recipient is currently unable to handle, usually for temporary reasons, e.g., if a sender attempts to send a message to a recipient that is offline but the recipient's host is not running an offline message storage service. |
static XmppError |
UNAUTHORIZED
Code 401 is used to inform nodes that they have provided incorrect authorization information, e.g., an incorrect password or unknown username when attempting to authenticate with a host. |
Constructor Summary | |
protected |
XmppError(int nCode,
java.lang.String sName)
Construct an error from a code and a description of the code. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Determine is two errors have the same code. |
int |
getCode()
Provide the standard integer code for the error. |
static XmppError |
getInstance(int nCode)
Provide an XmppError instance corresponding to the error code. |
java.lang.String |
getName()
Provides a human readable name of the error. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int m_nCode
protected java.lang.String m_sName
public static final XmppError REDIRECT
public static final XmppError BAD_REQUEST
public static final XmppError UNAUTHORIZED
public static final XmppError PAYMENT_REQUIRED
public static final XmppError FORBIDDEN
public static final XmppError NOT_FOUND
public static final XmppError NOT_ALLOWED
public static final XmppError NOT_ACCEPTABLE
public static final XmppError REGISTRATION_REQUIRED
public static final XmppError REQUEST_TIMEOUT
public static final XmppError CONFLICT
public static final XmppError INTERNAL_SERVER_ERROR
public static final XmppError NOT_IMPLEMENTED
public static final XmppError REMOTE_SERVER_ERROR
public static final XmppError SERVICE_UNAVAILABLE
public static final XmppError REMOTE_SERVER_TIMEOUT
protected static XmppError[] m_errors
Constructor Detail |
protected XmppError(int nCode, java.lang.String sName)
Construct an error from a code and a description of the code.
* @param nCode One of the standard Jabber error codes. * @param sName The well known name of the error code.
Method Detail |
public static XmppError getInstance(int nCode)
Provide an XmppError instance corresponding to the error code.
* @param nCode The XMPP error code. * @return XmppError An instance of this class.
public int getCode()
Provide the standard integer code for the error.
* @return The integer code.
public boolean equals(java.lang.Object obj)
Determine is two errors have the same code.
equals
in class java.lang.Object
public java.lang.String getName()
Provides a human readable name of the error. This is provided for error logs, as the code should be used for any comparisons.
* @return The name of the error code.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |