|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface implemented by all messages that get sent across the wire.
This interface contains methods and constants used for transmission
status and error reporting. The fields are part of the generated
verb messages, and any message which is declared to be transmittable
by itself.
When a call returns a message, and
sandTransmitStatus!=STATUS_NORMAL, then
sandTransmitErrorMessage is set to error text describing
the problem. This text may contain anything, but the following
conventions are recommended:
if(msg.getSandTransmitErrorMessage().startsWith(
SandTransmitMessage.APPERROR_NODE_UNAVAILABLE)) {
//react to node being down
...
}
The app may also use SandTransmitMessage.APPERROR_NODE_UNAVAILABLE as a
key to lookup localized text. Error prefix usage:
Most errors are application errors.
| Field Summary | |
static java.lang.String |
APPERROR_NODE_UNAVAILABLE
Application level error message indicating that the target node is not available. |
static java.lang.String |
APPERROR_NODE_UNKNOWN
Application level error message indicating that the target node is unknown. |
static java.lang.String |
APPERROR_NODE_UNREACHABLE
Application level error message indicating that the target node is unreachable. |
static int |
STATUS_APPERROR
The message status is an error which occurred at the level of the application. |
static int |
STATUS_NORMAL
The message status is normal. |
static int |
STATUS_SANDERROR
The message status is an error which occurred at the level of the development/deployment environment. |
static int |
STATUS_SYSERROR
The message status is an error which occurred at the system level. |
| Method Summary | |
int |
getSandTransmissionCount()
Return the transmission count for this message. |
long |
getSandTransmitAuthID()
Return the ID of messaging user for authorization purposes. |
java.lang.String |
getSandTransmitErrorMessage()
Return a full description of the error message, and any accompanying information. |
int |
getSandTransmitStatus()
Return one of the defined STATUS_* values representing the status of the message. |
void |
setSandTransmissionCount(int val)
Set the sandTransmissionCount of the message for tracking purposes. |
void |
setSandTransmitAuthID(long ID)
Set the ID of the messaging user for authorization purposes. |
void |
setSandTransmitErrorMessage(java.lang.String text)
Sets the sandTransmitErrorMessage to the given text. |
void |
setSandTransmitStatus(int status)
Sets the sandTransmitStatus to one of the defined STATUS_* values. |
| Methods inherited from interface org.sandev.basics.structs.SandMessage |
getCollectionMessage, getQueryMessage, getShortName, getStructMessage, getUpdateMessage, isEquivalent |
| Field Detail |
public static final java.lang.String APPERROR_NODE_UNKNOWN
When possible, this message text is followed by a space, then
"node: ", then the specified target node name.
public static final java.lang.String APPERROR_NODE_UNREACHABLE
When possible, this message text is followed by a space, then
"node: ", then the node instance name.
public static final java.lang.String APPERROR_NODE_UNAVAILABLE
When possible, this message text is followed by a space, then
"node: ", then the node instance name.
public static final int STATUS_NORMAL
public static final int STATUS_SYSERROR
public static final int STATUS_SANDERROR
public static final int STATUS_APPERROR
| Method Detail |
public int getSandTransmitStatus()
public void setSandTransmitStatus(int status)
public java.lang.String getSandTransmitErrorMessage()
public void setSandTransmitErrorMessage(java.lang.String text)
public long getSandTransmitAuthID()
public void setSandTransmitAuthID(long ID)
public int getSandTransmissionCount()
public void setSandTransmissionCount(int val)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||