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
ThreadPoolFilter();
IoConnector connector = new SocketConnector();
connector.getDefaultConfig().getFilterChain().addFirst(
"ioThreadPool", ioThreadPoolFilter );
connector.getDefaultConfig().getFilterChain().addLast(
"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:
lm.dispose();
.. for users integrating into a container, they would not use
BasicLifecycleManager at all. the lifecycles would be managed by the
container.
thoughts?
-pete
--
[EMAIL PROTECTED] - http://fotap.org/~osi
smime.p7s
Description: S/MIME cryptographic signature
