public interface APXMLMessage
extends java.io.Serializable
NOTE: By convention, implementations are thread-safe.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AGENT_APPLICATION_ID
Messages use the agent_application_id to identify the APAgent or APIA.
|
static java.lang.String |
AGENT_CLIENT_ID
Messages use the agent_client_id to identify the APAgent integration or APIA Integration Service.
|
static java.lang.String |
APIA_PASSWORD
This token is used to specify the password that may be required when submitting APXML messages to the Integration
Agent.
|
static java.lang.String |
APIA_PRIORITY
This token is used to differentiate normal priority APXML messages from high priority APXML message.
|
static java.lang.String |
APIA_PRIORITY_HIGH |
static java.lang.String |
APIA_PRIORITY_NORMAL |
static java.lang.String |
APIA_PROCESS_GROUP
This token is used to group APXML messages into subsets that are processed sequentially in FIFO order.
|
static java.lang.String |
APIA_SOURCE
This token is used to indicate the source of an APXML message.
|
static java.lang.String |
APIA_SOURCE_ALARMPOINT_PREFIX |
static java.lang.String |
APIA_SOURCE_APCLIENT_PREFIX |
static java.lang.String |
APIA_SOURCE_INTEGRATION_PREFIX |
static java.lang.String |
COMPANY_NAME
Messages use the company_name token to specify the owning company.
|
static java.lang.String |
DESTINATION
ExternalServiceRequest responses use destination to target the response.
|
static java.lang.String |
ERROR_CODE
Error messages use the error_code to identify the problem cause.
|
static java.lang.String |
ERROR_METHOD
The method/subclass for APXML sent by the server for failed submission.
|
static java.lang.String |
ERROR_SUBCLASS |
static java.lang.String |
LIST_DELIM_SUFFIX
Messages use a token with this suffix to indicate that its value represents a list delimiter for the
corresponding unsuffixed token's value.
|
static java.lang.String |
OK_METHOD
The method/subclass for APXML sent by the server for successful submission.
|
static java.lang.String |
OK_SUBCLASS |
static java.lang.String |
ORIGINATOR
ExternalServiceRequest messages use originator to indicate where the response should be targeted.
|
static java.lang.String |
RECIPIENTS
Messages use the recipients token to specify who (e.g., user or group), should be contacted by whatever
events/notifications the message initiates.
|
static java.lang.String |
REQUEST_ID
ExternalServiceRequet/Message messages use request_id to uniquely identify the message.
|
static java.lang.String |
REQUEST_METHOD
The method/subclass for APXML sent by ExternalServiceRequest2.
|
static java.lang.String |
REQUEST_SUBCLASS |
static java.lang.String |
RESPONSE_METHOD
The method/subclass for APXML sent to ExternalServiceRequest2.
|
static java.lang.String |
RESPONSE_SUBCLASS |
static java.lang.String |
SEND_METHOD
The method/subclass for APXML sent by ExternalServiceMessage.
|
static java.lang.String |
SEND_SUBCLASS |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMethod()
Gets the message's mandatory method, which defines the highest-level purpose of the message (e.g., Add, Delete,
etc.).
|
java.lang.String |
getSubclass()
Gets the message's optional subclass, which provides a more refined purpose to the message (e.g., Add/Event).
|
APXMLToken |
getToken(java.lang.String key)
Gets the token (if any) with the specified case-insensitive key.
|
java.util.Iterator<APXMLToken> |
getTokens()
Gets the list of tokens that this message contains.
|
int |
getTransactionId()
Gets the mandatory transaction id, which is an application-defined value used track messages.
|
java.lang.String |
getValue(java.lang.String key)
Gets the value of the token (if any) with the specified case-insensitive key.
|
boolean |
hasToken(java.lang.String key)
Determines whether or not the message contains a token with the specified case-insensitive key.
|
APXMLToken |
removeToken(java.lang.String key)
Ensures that the message does not contain a token with the specified case-insensitive key.
|
void |
setMethod(java.lang.String method)
Sets the message's method.
|
void |
setSubclass(java.lang.String subclass)
Sets the message's subclass.
|
APXMLToken |
setToken(java.lang.String key,
java.lang.Object val)
Adds/replaces an auto-typed token to/in this message.
|
APXMLToken |
setToken(java.lang.String key,
java.lang.Object val,
APXMLToken.Type type)
The analog of
setToken(String, Object) , but with an explicit token type. |
void |
setTransactionId(int transactionId)
Sets the message's transaction id.
|
java.lang.String |
toString()
Gets the XML representation of this message.
|
static final java.lang.String REQUEST_METHOD
static final java.lang.String REQUEST_SUBCLASS
static final java.lang.String RESPONSE_METHOD
static final java.lang.String RESPONSE_SUBCLASS
static final java.lang.String SEND_METHOD
static final java.lang.String SEND_SUBCLASS
static final java.lang.String OK_METHOD
static final java.lang.String OK_SUBCLASS
static final java.lang.String ERROR_METHOD
static final java.lang.String ERROR_SUBCLASS
static final java.lang.String ERROR_CODE
static final java.lang.String REQUEST_ID
static final java.lang.String ORIGINATOR
static final java.lang.String DESTINATION
static final java.lang.String AGENT_APPLICATION_ID
static final java.lang.String AGENT_CLIENT_ID
static final java.lang.String COMPANY_NAME
static final java.lang.String RECIPIENTS
static final java.lang.String LIST_DELIM_SUFFIX
static final java.lang.String APIA_SOURCE
static final java.lang.String APIA_SOURCE_APCLIENT_PREFIX
static final java.lang.String APIA_SOURCE_ALARMPOINT_PREFIX
static final java.lang.String APIA_SOURCE_INTEGRATION_PREFIX
static final java.lang.String APIA_PRIORITY
static final java.lang.String APIA_PRIORITY_NORMAL
static final java.lang.String APIA_PRIORITY_HIGH
static final java.lang.String APIA_PROCESS_GROUP
static final java.lang.String APIA_PASSWORD
int getTransactionId()
void setTransactionId(int transactionId)
transactionId
- - the transaction id; must be in the range [1,2147483647]getTransactionId()
java.lang.String getMethod()
void setMethod(java.lang.String method)
NOTE: The method's case is preserved.
method
- - the method; must be non-empty after trimming leading/trailing whitespacegetMethod()
java.lang.String getSubclass()
void setSubclass(java.lang.String subclass)
NOTE: The subclass' case is preserved.
subclass
- - the subclass; may be null or empty (after trimming leading/trailing whitespace), to indicate
that the message has no subclassgetSubclass()
APXMLToken getToken(java.lang.String key)
key
- - the name of the token; must be non-empty after trimming leading/trailing whitespacejava.lang.String getValue(java.lang.String key)
key
- - the name of the token; must be non-empty after trimming leading/trailing whitespaceAPXMLToken setToken(java.lang.String key, java.lang.Object val)
NOTE: The token's key is trimmed of whitespace and converted to lowercase before inclusion.
key
- - the name of the token; must be non-empty after trimming leading/trailing whitespace and cannot
contain any internal spacesval
- - the token's value; converted to string using Object.toString() with null value being treated as an
empty stringAPXMLToken setToken(java.lang.String key, java.lang.Object val, APXMLToken.Type type)
setToken(String, Object)
, but with an explicit token type.
NOTE:No check is performed to verify that the value complies with the specified type.
key
- - the name of the token; must be non-empty after trimming leading/trailing whitespace and cannot
contain any internal spacesval
- - the token's value; converted to string using Object.toString() with null value being treated as an
empty stringtype
- - the token's type; must be non-nullsetToken(String, Object)
APXMLToken removeToken(java.lang.String key)
key
- - the name of the token to remove; must be non-empty after trimming leading/trailing whitespaceboolean hasToken(java.lang.String key)
key
- - the name of the token; must be non-empty after trimming leading/trailing whitespacejava.util.Iterator<APXMLToken> getTokens()
NOTE: The returned iterator is thread-safe.
java.lang.String toString()
toString
in class java.lang.Object