Creating and Deleting DataGroups
Creating Universal Messaging DataGroups
nDataGroups can be created programmatically as detailed below, or they can be created using the Enterprise Manager.
In order to create a nDataGroup, first of all you must create an nSession object, which is effectively the logical and physical connection to a Universal Messaging Realm. This is achieved by using an RNAME for your Universal Messaging Realm when constructing the nSessionAttributes object, as shown below:
var RNAME : String = "nhp://nirvanahost:80";
var username : String = "myUserName";
var appName : String = "MyApplicationName";
var attributes : nSessionAttributes = new nSessionAttributes(RNAME,5);
var mySession : nSession = nSessionFactory.create(attributes, username,
Once the nSession.init() method is successfully called, your connection to the realm will be established.
Using the nSession object instance mySession, you can then create DataGroups.
Create a nDataGroup
Create multiple nDataGroups
var groups : Array = ["myFirstGroup", "mySecondGroup"];
Now we will get a call back to dataGroupsCallback and have a reference to the Universal Messaging datagroup(s) within the realm or an error.
Creating DataGroups with DataGroupListeners and ConflationAttributes
It is also possible to specify additional properties when creating DataGroups:
Now we have a reference to a Universal Messaging DataGroup it is possible to publish events.
Deleting Universal Messaging DataGroups
There are various deleteDataGroup methods available on nSession which will delete DataGroups. It is possible to specify single nDataGroups or arrays of nDataGroups.