Hi Yuan, have a look at Netty [1] which is designed like what you describe (and more actively developed). Its main developer is the former main developer of Mina.
regards, christian [1] http://jboss.org/netty/ 2009/8/24 Zhang Yuan <[email protected]>: > 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 >
