I am trying to receive push data from blazeds. I found how to send push data from blazeds without any message from client in HERE. Now I don't know how to know from flex that data has been sent from server and how to receive that data . Thanks :)
Asked
Active
Viewed 318 times
1 Answers
0
To recieve messages from the link that you shared above there are couple of things that you need to do.
You need to declare a Consumer as shown below that will consume messages from the defined channel.
Note that I set the
message
property to an event handler show belowprivate function onMsg(event:MessageEvent):void { trace("Signal Arrives : "+event.message.body); //var signal:SignalProcessor = new SignalProcessor (); //signal.processMessage(event.message.body); }
Create a method that will be called at creationComplete of your application such as one defined below
private function suscribeForMessages():void { //Where consumer is the Id of the Consumer mxml tag. //You need the selector only if you want your client to selectively recieve messages from //the adapter. consumer.selector = "filterID IN('"+userIdVariable+"')"; consumer.subscribe(); }
The 3 steps above should get you up and bouncing. Good luck.

Adekanmbi Oluremi
- 51
- 1