Dear All:
I have a question about the event driven design of mina. In mina's
IoFilters,there are many handlers
to take care of event such as close,sent or received.
But why not just define a class called SessionIoEvent, which has many
subclasses-such as ExceptionEvent,
MessagEvent and so on- to represent all these IO events? It looks this
design will simplify the interfaces
of IoFilter into just a single method like "handlerEvent(SessionIoEvent
eve)". Also, it will make
DefaultIoFilterChain easy to be implemeted - it will save "CallNext***"
method to just one method.
What are the reasons to make mina's current design not to have an explicit
SessionIOEvent class?
Please give my some hints, thanks a lot:-)
Yours Yuan