Universal Messaging Developer Guide : Web Client APIs : Web Developer's Guide for Javascript : JavaScript Objects : Event Dictionaries
Event Dictionaries
Event Dictionaries (nEventProperties) provide an accessible and flexible way to store any number of message properties for delivery within a Universal Messaging Event.
Event Dictionaries are quite similar to a hash table, supporting primitive types, arrays, and nested dictionaries.
Universal Messaging filtering allows subscribers to receive only specific subsets of a channel's events by applying the server's advanced filtering capabilities to the contents of each event's dictionary.
In this code snippet, we assume we want to publish an event containing a string, say, with a name of "demoMessage":

var mySession = Nirvana.createSession();
var myChannel = mySession.getChannel("/tutorial/sandbox");
var myEvent = Nirvana.createEvent();
var myDict = myEvent.getDictionary();
myDict.putString("demoMessage", "Hello World");
myChannel.publish(myEvent);
Note that in this example code, we also create a new Universal Messaging Event object to make use of our Event Dictionary (nEventProperties).
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback