|Re: A Message-sent handler proposal [message #612046 is a reply to message #612045]
||Tue, 23 January 2007 16:49
| Scott Lewis
Registered: July 2009
> working with ECF on my application, i need to handle send/receive messages of the shared objects for tracing all the messages that are received and sent from/to all the others shared objects; to handle received messages I can add a IEventProcessor, but I don't find any mechanism to handle the event that my shared object sent a message.
> So, i've added this mechanism as an event/listener mechanism: i've a IMessageSendedHandler, and after the getContext().sendMessage(...), I fire the event to all registered listeners.
> Can this problem be tackled (this way or any other) in one of the future releases of ECF?
It could. Just so I'm clear...you are interested in a listener for
*all* shared object messages within a given container?
Note another way to do what you want to do is to override one of the
container classes (TCPClientSOContainer) and override one of the
protected methods for handling shared object messages.
We could also build into the IContainerListener the notification of
shared object messages, and then any registered listeners (via
IContainer.addListener(IContainerListener) would be notified of these
messages (for ISharedObjectContainers anyway).
If you could describe the use case a little further we can jointly
figure out what the right answer is here.
Powered by FUDForum
. Page generated in 0.01638 seconds