org.jcomponent.netserve.connection.impl
Class PicoConnectionManager

java.lang.Object
  extended byorg.jcomponent.netserve.connection.impl.AbstractConnectionManager
      extended byorg.jcomponent.netserve.connection.impl.PicoConnectionManager
All Implemented Interfaces:
ConnectionManager

public class PicoConnectionManager
extends AbstractConnectionManager
implements ConnectionManager

An implementation of ConnectionManager which is PicoContainer compatible.

A sample of configuration parameters for the component are given below. shutdownTimeout indicates how long we should wait to see if incoming connections will shutdown gracefully when asked. If they dont shutdown gracefully and forceShutdown is true then the connection will be forced to be shutdown if the user asked for connection to be "tearedDown".

Version:
$Revision: 1.4 $ $Date: 2003/10/14 04:23:49 $
Author:
Mauro Talevi

Constructor Summary
PicoConnectionManager(ConnectionMonitor monitor, org.jcomponent.threadpool.ThreadPool defaultThreadPool)
          Create ConnectionManager specifying monitor and thread pool.
PicoConnectionManager(ConnectionMonitor monitor, org.jcomponent.threadpool.ThreadPool defaultThreadPool, SocketAcceptorManager acceptorManager, boolean forceShutdown, int shutdownTimeout)
          Constructor.
PicoConnectionManager(org.jcomponent.threadpool.ThreadPool defaultThreadPool)
          Create component but only specify the default thread pool.
 
Method Summary
 void dispose()
          Dispose the ConnectionManager which involves shutting down all the connected acceptors.
 
Methods inherited from class org.jcomponent.netserve.connection.impl.AbstractConnectionManager
connect, connect, disconnect, setAcceptorManager, setDefaultThreadPool, setForceShutdown, setMonitor, setShutdownTimeout, shutdownAcceptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jcomponent.netserve.connection.ConnectionManager
connect, connect, disconnect
 

Constructor Detail

PicoConnectionManager

public PicoConnectionManager(org.jcomponent.threadpool.ThreadPool defaultThreadPool)
Create component but only specify the default thread pool.

Parameters:
defaultThreadPool - the default thread pool

PicoConnectionManager

public PicoConnectionManager(ConnectionMonitor monitor,
                             org.jcomponent.threadpool.ThreadPool defaultThreadPool)
Create ConnectionManager specifying monitor and thread pool.

Parameters:
monitor - the monitor
defaultThreadPool - the default thread pool

PicoConnectionManager

public PicoConnectionManager(ConnectionMonitor monitor,
                             org.jcomponent.threadpool.ThreadPool defaultThreadPool,
                             SocketAcceptorManager acceptorManager,
                             boolean forceShutdown,
                             int shutdownTimeout)
Constructor.

Parameters:
monitor - the ConnectionMonitor
defaultThreadPool - the ThreadPool used as default is not set in the ConnectionManager.connect(java.lang.String, java.net.ServerSocket, org.jcomponent.netserve.connection.ConnectionHandlerManager, org.jcomponent.threadpool.ThreadPool)
acceptorManager - the AcceptorManager
forceShutdown - boolean true if we need to force connections shutdown when they don't gracefully in specified time-period.
shutdownTimeout - the number of milliseconds to wait for connection to shutdown gracefully.
Method Detail

dispose

public void dispose()
Dispose the ConnectionManager which involves shutting down all the connected acceptors.



Copyright © 1999-2003 The Spice Group. All Rights Reserved.