org.apache.james.services
Interface JamesConnectionManager

All Superinterfaces:
org.apache.avalon.cornerstone.services.connection.ConnectionManager
All Known Implementing Classes:
SimpleConnectionManager

public interface JamesConnectionManager
extends org.apache.avalon.cornerstone.services.connection.ConnectionManager

This interface extends the standard ConnectionManager interface to allow connectionLimits to be specified on a per service basis


Field Summary
static String ROLE
          The component role used by components implementing this service
 
Method Summary
 void connect(String name, ServerSocket socket, org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory)
          Start managing a connection.
 void connect(String name, ServerSocket socket, org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory, int maxOpenConnections)
          Start managing a connection.
 void connect(String name, ServerSocket socket, org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory, org.apache.excalibur.thread.ThreadPool threadPool)
          Start managing a connection.
 void connect(String name, ServerSocket socket, org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory, org.apache.excalibur.thread.ThreadPool threadPool, int maxOpenConnections)
          Start managing a connection.
 int getMaximumNumberOfOpenConnections()
          Returns the default maximum number of open connections supported by this SimpleConnectionManager
 
Methods inherited from interface org.apache.avalon.cornerstone.services.connection.ConnectionManager
disconnect, disconnect
 

Field Detail

ROLE

public static final String ROLE
The component role used by components implementing this service

See Also:
Constant Field Values
Method Detail

getMaximumNumberOfOpenConnections

public int getMaximumNumberOfOpenConnections()
Returns the default maximum number of open connections supported by this SimpleConnectionManager

Returns:
the maximum number of connections

connect

public void connect(String name,
                    ServerSocket socket,
                    org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory,
                    org.apache.excalibur.thread.ThreadPool threadPool,
                    int maxOpenConnections)
             throws Exception
Start managing a connection. Management involves accepting connections and farming them out to threads from pool to be handled.

Parameters:
name - the name of connection
socket - the ServerSocket from which to
handlerFactory - the factory from which to acquire handlers
threadPool - the thread pool to use
maxOpenConnections - the maximum number of open connections allowed for this server socket.
Throws:
Exception - if an error occurs

connect

public void connect(String name,
                    ServerSocket socket,
                    org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory,
                    int maxOpenConnections)
             throws Exception
Start managing a connection. This is similar to other connect method except that it uses default thread pool.

Parameters:
name - the name of connection
socket - the ServerSocket from which to
handlerFactory - the factory from which to acquire handlers
maxOpenConnections - the maximum number of open connections allowed for this server socket.
Throws:
Exception - if an error occurs

connect

public void connect(String name,
                    ServerSocket socket,
                    org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory,
                    org.apache.excalibur.thread.ThreadPool threadPool)
             throws Exception
Start managing a connection. Management involves accepting connections and farming them out to threads from pool to be handled.

Specified by:
connect in interface org.apache.avalon.cornerstone.services.connection.ConnectionManager
Parameters:
name - the name of connection
socket - the ServerSocket from which to
handlerFactory - the factory from which to acquire handlers
threadPool - the thread pool to use
Throws:
Exception - if an error occurs

connect

public void connect(String name,
                    ServerSocket socket,
                    org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory)
             throws Exception
Start managing a connection. Management involves accepting connections and farming them out to threads from pool to be handled.

Specified by:
connect in interface org.apache.avalon.cornerstone.services.connection.ConnectionManager
Parameters:
name - the name of connection
socket - the ServerSocket from which to
handlerFactory - the factory from which to acquire handlers
Throws:
Exception - if an error occurs


"Copyright © 1999-2006 Apache Jakarta Project. All Rights Reserved."