Hi Erix,
When you implement an IoFilter, in some of the methods, you get a hook to the
next filter in the chain so that you can forward to the next filter (e.g.
messageReceived).
However, if, say, the messageReceived method in the IoFilter interface takes in
an instance of IoFilter instead of IoFilter.NextFilter, you would be able to do
a whole lot of stuffs to the IoFilter than would be possible with
IoFilter.NextFilter.
In this case, the IoFilter.NextFilter interface sort of acts as an interface
contract to what can be done with a hook to the next filter.
i'm still getting to grips with MINA though, so could anyone correct me if i'm
wrong.
HTH,
Edwin
--- Erix Yao <[EMAIL PROTECTED]> wrote:
> Why the NextFilter interface is defined?
> What is its special purpose?
> It has almost the same interface with IoFilter, why define them again ?
> Or we can let NextFilter extends IoFilter.
______________________________________________________________________
Search, browse and book your hotels and flights through Yahoo! Travel.
http://sg.travel.yahoo.com