Universal Messaging Event Attributes
Universal Messaging Event Attributes are objects which contain meta-data about a Universal Messaging Event
. A Client can query the attributes of a delivered event to provide specific handling for different types of event depending on its attributes.
Some header information contained in an Event Attributes object can be set by the client prior to publishing the Event. This information will subsequently be delivered to any clients who receive it.
Obtaining an nEventAttributes object
If an Event does not explicitly have any Event Attributes, then a new, empty Event Attributes object is initialized for the Event with a call to getEventAttributes():
var attribs = someEvent.getEventAttributes();
Merging and Registered Events
method of nEventAttributes.
// Some registered event specific code here...
// Some registered delta-specific code here...
Obtaining the Event TimeStamp
If configured to do so, the realm server will stamp each event it delivers to the client with the time it was received. This timestamp can be accessed through the nEventAttributes object.
var age = now - aEvent.getAttributes().getTimeStamp();
The nEventAttributes object also contains methods for setting and getting other attributes associated with the object. These include JMS specific headers and details on the origin, destination and join channels. To see the full list of operations available on this object consult the API documentation.