« Return to Thread: [mina] Refactoring MINA IoFilterChain (Was: IoFilters: DIRMINA-121 / 122)

Re: [mina] Refactoring MINA IoFilterChain (Was: IoFilters: DIRMINA-121 / 122)

by Trustin Lee :: Rate this Message:

Reply to Author | View in Thread

2005/11/15, Niklas Therning <niklas@...>:
I just realized that when calling IoSession.write() the concrete
IoSession implementation will always know the final destination of the
write event. For SocketSessionImpl the final destination is always
SocketIoProcessor.

So the IoFilterChain methods for downstream events look like this:

void write( IoSession session, WriteRequest writeRequest, IoProcessor p
) throws Exception;

SocketSessionImpl's write() method looks like this:

public WriteFuture write( Object message ) {
    this.filterChain.write(this, new WriteRequest(),
SocketIoProcesso.getInstance());
}

What is the difference from overriding the head filter of sessionmanager-level chain to call SocketIoProcessor.flush() explicitly?  We can still get rid of SocketSessionManagerFilterChain without introducing a new parameter.

I'll check in this change so you can see it more clearly.

Cheers,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/

 « Return to Thread: [mina] Refactoring MINA IoFilterChain (Was: IoFilters: DIRMINA-121 / 122)