Hi. The invoke method is called by the flex messaging system
(I believe by the message broker) when a message is received from a
flex client. This is where I think you would call into your backend
messaging service. You would then need to have a method setup to
receive the async callbacks from your messaging service and it is
here that you would push the messages back out to your flex clients
using what's shown in the invoke method in the doc.
MessageService msgService = (MessageService)service;
msgService.pushMessageToClients(message, true);
msgService.sendPushMessageFromPeer(message, true);
Does that make sense? Also, in the example from doc, the
service object that is used is defined in the ServiceAdapter class
which your custom adapter class will inherit from. I'm not sure if
that was clear.