mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter royal <pro...@apache.org>
Subject mina component lifecycles
Date Sat, 04 Mar 2006 03:56:12 GMT
I think we mainly need a 'disposal' phase, for when things are no  
longer needed. init/start/stop could be added, but I'm not sure we  
need them yet.

When running "containerless", we can have a BasicLifecycleManager.  
This is just a convenience to do disposal on a bunch of components in  
one shot.

to take the sumup.Client example:

         ThreadPoolFilter ioThreadPoolFilter = new ThreadPoolFilter();
         ThreadPoolFilter protocolThreadPoolFilter = new  
         IoConnector connector = new SocketConnector();
                 "ioThreadPool", ioThreadPoolFilter );
                 "protocolThreadPool", protocolThreadPoolFilter );

users would then also do

	BasicLifecycleManager lm = new BasicLifecycleManager();

	lm.add( ioThreadPoolFilter );
	lm.add( protocolThreadPoolFilter );
	lm.add( connector );

and then, when the system is done:


.. for users integrating into a container, they would not use  
BasicLifecycleManager at all. the lifecycles would be managed by the  



proyal@apache.org - http://fotap.org/~osi

View raw message