On May 4, 2006, at 8:27 PM, Sankalp Acharya wrote:
The reason I ask is because in my current implementation,
MyServerSessionHandler doesn't do much more than act as a "translator",
converting messages it receives (I'm using an
ObjectSerializationCodecFactory and custom message classes to implement my protocol) to custom events that various components in the rest of the
application can handle independently.  But this is effectively forcing
me bind MyServerSessionHandler and MyServer fairly closely, since I am
using MyServer as the mechanism for other components to
register/unregister for my custom application events.

Not sure if we have any "Best Practices" yet :) ... But in my case, the work component for my server-side implements IoHandler directly and also manages binding/unbinding itself in the start/stop lifecycle events of its container. This has been working well for me. Decomposing the IoHandler and the rest of the class is certainly possible, but seemed like over-componentizing in my situation.
-pete

--
[EMAIL PROTECTED] - http://fotap.org/~osi


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to