You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Ashish <pa...@gmail.com> on 2011/06/30 13:41:47 UTC

[MINA 3.0] Thought on IoHandler

Folks,

Long back, we discussed that we don't need IoHandler as its just another
version of IoFilter.

Based on this, had some more thoughts

1. We remove IoHandler interface
2. We still keep IoService#setHandler with following signature
    void setHandler(IoFilter handler);

Internally, we add this to the end of the FilterChain with name "ioHandler"
or something, as for us IoHandler is the end of chain.
This otherwise can be done implicitly by picking up last IoFilter in chain.
The advantage that I see with this approach is, the user
exactly knows the end of chain (keeps whatever needs to be done thr).

This shall be beneficial when we have the functionality that an IoFilter can
dynamically choose which filter to be executed next.
And in that case as well, the last filter shall be our IoHandler.

wdyt?

-- 
thanks
ashish

Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal