directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
Subject Re: [mina] Current status
Date Mon, 20 Dec 2004 00:27:24 GMT


> Berin, Trustin wdyt about using similar constructs in SEDA or even
> making these filter interfaces common (shared across sedang and mina) in
> the protocol API packages?  Is it worth doing that?  Me, I think so.

Good idea.

> >I/O threads starts when there are any channels to handle, and they
> >stops when there are no channels to do.  So convenient, eh? :)
> >
> Huh? I must have missed someting :).  How does this work with thread
> pools?  And why do you do this? Meaning what's the advantage?

The biggest advantage is that there is no need to explicitly invoke
start() and stop() methods.  For example:

Acctptor acceptor = TcpAcceptor();
acceptor.bind(new InetSocketAddress(8080)); // i/o thread starts
acceptor.unbind(new InetSocketAddress(8080));  // i/o thread stops if
there are no connection available
// finally all threads will die when all connections are closed

This is good because JVM shuts down very smoothly without any stop() method.

BTW, filters doesn't have any life cycle methods like 'shutdown()', so
if there are any filters which need lifecycle management we'll suffer
from that.  It would be nice to add 'destroy()' method to handle that

what we call human nature is actually human habit

View raw message