public class BamError
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
BamError.ErrorGroup |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
address_MALFORMED
The target address syntax is invalid ("modify")
|
static java.lang.String |
BAD_REQUEST
Malformed or unprocessable request, e.g.
|
static java.lang.String |
CONFLICT
An existing resource or session already exists.
|
static java.lang.String |
CONNECTION_TIMEOUT
Error if the connection to the server failed.
|
static java.lang.String |
FEATURE_NOT_IMPLEMENTED
The feature is nor implemented, e.g.
|
static java.lang.String |
FORBIDDEN
The requestor does not have proper authorization.
|
static java.lang.String |
GONE
The target or server is no longer at this address.
|
static java.lang.String |
INTERNAL_SERVER_ERROR
An internal server error ("wait")
|
static java.lang.String |
ITEM_NOT_FOUND
The target address doesn't exist ("cancel")
|
static java.lang.String |
NOT_ACCEPTABLE
The request is forbidden because of application policy, i.e.
|
static java.lang.String |
NOT_ALLOWED
The server does not any entity to perform the action ("cancel")
|
static java.lang.String |
NOT_AUTHORIZED
The entity does not have the proper credentials ("auth")
|
static java.lang.String |
PAYMENT_REQUIRED
The entity does not have payment to the service ("auth")
|
static java.lang.String |
RECIPIENT_UNAVAILABLE
The recipient exists, but is currently not attached ("wait")
|
static java.lang.String |
REDIRECT
The recipient is at a new address ("modify")
|
static java.lang.String |
REGISTRATION_REQUIRED
The entity does not have proper registration for the service ("auth")
|
static java.lang.String |
REMOTE_CONNECTION_FAILED
Error if the connection to the remote connection failed.
|
static java.lang.String |
REMOTE_LISTENER_UNAVAILABLE
Error if the target server does not have a bam protocol
listener available.
|
static java.lang.String |
REMOTE_SERVER_NOT_FOUND
The remote server does not exist ("cancel")
|
static java.lang.String |
REMOTE_SERVER_TIMEOUT
The remote server could not be contacted ("wait")
|
static java.lang.String |
RESOURCE_CONSTRAINT
The remote service does not have resources to process the request ("wait")
|
static java.lang.String |
SERVICE_UNAVAILABLE
The remote server does not provide the service ("cancel")
|
static java.lang.String |
SUBSCRIPTION_REQUIRED
The resource required a subscription before use ("auth")
|
static java.lang.String |
TYPE_AUTH
Retry after providing credentials
|
static java.lang.String |
TYPE_CANCEL
Do not retry, i.e.
|
static java.lang.String |
TYPE_CONTINUE
proceed, i.e.
|
static java.lang.String |
TYPE_MODIFY
change the request data and try again
|
static java.lang.String |
TYPE_WAIT
Retry after waiting
|
static java.lang.String |
UNDEFINED_CONDITION
An error outside this list (should have an _extra field)
|
static java.lang.String |
UNEXPECTED_REQUEST
The request was syntactically correct, but out-of-order ("wait")
|
Constructor and Description |
---|
BamError(java.lang.String text)
Misc error
|
BamError(java.lang.String type,
java.lang.String group)
An error response
|
BamError(java.lang.String type,
java.lang.String group,
java.lang.String text)
An error response
|
BamError(java.lang.String type,
java.lang.String group,
java.lang.String text,
java.io.Serializable data)
An error response
|
Modifier and Type | Method and Description |
---|---|
static BamError |
create(java.lang.Throwable e)
Creates an ActorError based on an exception
|
ErrorPacketException |
createException() |
java.io.Serializable |
getData()
Returns any data for the error
|
java.lang.Throwable |
getException()
Returns a wrapped exception for the error.
|
java.io.Serializable |
getExtra()
Extra information for UNDEFINED_CONDITION
|
java.lang.String |
getGroup()
Returns the error group
|
java.lang.String |
getText()
Returns the error text
|
java.lang.String |
getType()
Returns the error type
|
void |
setData(java.io.Serializable data)
Sets any data for the error
|
void |
setExtra(java.io.Serializable extra)
Extra information for UNDEFINED_CONDITION
|
java.lang.String |
toString() |
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
public static final java.lang.String CONNECTION_TIMEOUT
public static final java.lang.String REMOTE_CONNECTION_FAILED
public static final java.lang.String REMOTE_LISTENER_UNAVAILABLE
public static final java.lang.String BAD_REQUEST
public static final java.lang.String CONFLICT
public static final java.lang.String FEATURE_NOT_IMPLEMENTED
public static final java.lang.String FORBIDDEN
public static final java.lang.String GONE
public static final java.lang.String INTERNAL_SERVER_ERROR
public static final java.lang.String ITEM_NOT_FOUND
public static final java.lang.String address_MALFORMED
public static final java.lang.String NOT_ACCEPTABLE
public static final java.lang.String NOT_ALLOWED
public static final java.lang.String NOT_AUTHORIZED
public static final java.lang.String PAYMENT_REQUIRED
public static final java.lang.String RECIPIENT_UNAVAILABLE
public static final java.lang.String REDIRECT
public static final java.lang.String REGISTRATION_REQUIRED
public static final java.lang.String REMOTE_SERVER_NOT_FOUND
public static final java.lang.String REMOTE_SERVER_TIMEOUT
public static final java.lang.String RESOURCE_CONSTRAINT
public static final java.lang.String SERVICE_UNAVAILABLE
public static final java.lang.String SUBSCRIPTION_REQUIRED
public static final java.lang.String UNDEFINED_CONDITION
public static final java.lang.String UNEXPECTED_REQUEST
public BamError(java.lang.String text)
text
- an error textpublic BamError(java.lang.String type, java.lang.String group)
type
- the error typegroup
- the error grouppublic BamError(java.lang.String type, java.lang.String group, java.lang.String text)
type
- the error typegroup
- the error grouptext
- the error textpublic BamError(java.lang.String type, java.lang.String group, java.lang.String text, java.io.Serializable data)
type
- the error typegroup
- the error grouptext
- the error textpublic static BamError create(java.lang.Throwable e)
public java.lang.String getType()
public java.lang.String getGroup()
public java.lang.String getText()
public java.io.Serializable getData()
public void setData(java.io.Serializable data)
public java.lang.Throwable getException()
public java.io.Serializable getExtra()
public void setExtra(java.io.Serializable extra)
public ErrorPacketException createException()
public java.lang.String toString()
toString
in class java.lang.Object