Universal Messaging 9.10 | Universal Messaging Developer Guide | Web Client APIs | Web Developer's Guide for Adobe Flex | Publish / Subscribe using Datastreams and Datagroups | DataStream Event Publishing
 
DataStream Event Publishing
You can get references to any nDataStream (user) from the nSession object if you call getDefaultDataGroup(). You can also access nDataStreams by implementing the nDataGroupListener interface. Please see Managing DataGroup Membership for more information. This will deliver callbacks as users are connected/disconnected. There are various writeDataStream methods available. These methods also support batching of multiple events to a single group or batching of writes to multiple DataStreams.

var props:nEventProperties = new nEventProperties();

props.put("key0string"+x, "1"+x);
props.put("key1int", int(1));
props.put("key2long", long(-11));

var evt1:nConsumeEvent = new nConsumeEvent(props, buffer);

//Publish the event
var events:Array = [evt1];
mySession.writeDataStream(events, myDataStreams);

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.