public class XMPPError extends Object
| Code | XMPP Error | Type |
| 500 | interna-server-error | WAIT |
| 403 | forbidden | AUTH |
| 400 | bad-requestMODIFY | >|
| 404 | item-not-found | CANCEL |
| 409 | conflict | CANCEL |
| 501 | feature-not-implemented | CANCEL |
| 302 | gone | MODIFY |
| 400 | jid-malformed | MODIFY |
| 406 | no-acceptable | MODIFY |
| 405 | not-allowed | CANCEL |
| 401 | not-authorized | AUTH |
| 402 | payment-required | AUTH |
| 404 | recipient-unavailable | WAIT |
| 302 | redirect | MODIFY |
| 407 | registration-required | AUTH |
| 404 | remote-server-not-found | CANCEL |
| 504 | remote-server-timeout | WAIT |
| 502 | remote-server-error | CANCEL |
| 500 | resource-constraint | WAIT |
| 503 | service-unavailable | CANCEL |
| 407 | subscription-required | AUTH |
| 500 | undefined-condition | WAIT |
| 400 | unexpected-condition | WAIT |
| 408 | request-timeout | CANCEL |
| Modifier and Type | Class and Description |
|---|---|
static class |
XMPPError.Condition
A class to represent predefined error conditions.
|
static class |
XMPPError.Type
A class to represent the type of the Error.
|
| Constructor and Description |
|---|
XMPPError(int code)
Deprecated.
new errors should be created using the constructor XMPPError(condition)
|
XMPPError(int code,
String message)
Deprecated.
new errors should be created using the constructor XMPPError(condition, message)
|
XMPPError(int code,
XMPPError.Type type,
String condition,
String message,
List<PacketExtension> extension)
Creates a new error with the specified code, type, condition and message.
|
XMPPError(XMPPError.Condition condition)
Creates a new error with the specified condition infering the type and code.
|
XMPPError(XMPPError.Condition condition,
String messageText)
Creates a new error with the specified condition and message infering the type and code.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExtension(PacketExtension extension)
Adds a packet extension to the error.
|
int |
getCode()
Returns the error code.
|
String |
getCondition()
Returns the error condition.
|
PacketExtension |
getExtension(String elementName,
String namespace)
Returns the first patcket extension that matches the specified element name and
namespace, or null if it doesn't exist.
|
List<PacketExtension> |
getExtensions()
Returns an Iterator for the error extensions attached to the xmppError.
|
String |
getMessage()
Returns the message describing the error, or null if there is no message.
|
XMPPError.Type |
getType()
Returns the error type.
|
void |
setExtension(List<PacketExtension> extension)
Set the packet extension to the error.
|
String |
toString() |
String |
toXML()
Returns the error as XML.
|
public XMPPError(XMPPError.Condition condition)
condition - the error condition.public XMPPError(XMPPError.Condition condition, String messageText)
condition - the error condition.messageText - a message describing the error.public XMPPError(int code)
code - the error code.public XMPPError(int code,
String message)
code - the error code.message - a message describing the error.public XMPPError(int code,
XMPPError.Type type,
String condition,
String message,
List<PacketExtension> extension)
code - the error code.type - the error type.condition - the error condition.message - a message describing the error.extension - list of packet extensionspublic String getCondition()
public XMPPError.Type getType()
public int getCode()
public String getMessage()
public String toXML()
public List<PacketExtension> getExtensions()
public PacketExtension getExtension(String elementName, String namespace)
elementName - the XML element name of the packet extension.namespace - the XML element namespace of the packet extension.public void addExtension(PacketExtension extension)
extension - a packet extension.public void setExtension(List<PacketExtension> extension)
extension - a packet extension.Copyright © 2003-2007 Jive Software.