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 java.lang.String ROLE
          The component role used by components implementing this service
 
Method Summary
 void connect(java.lang.String name, java.net.ServerSocket socket, org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory)
          Start managing a connection.
 void connect(java.lang.String name, java.net.ServerSocket socket, org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory, int maxOpenConnections)
          Start managing a connection.
 void connect(java.lang.String name, java.net.ServerSocket socket, org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory, org.apache.excalibur.thread.ThreadPool threadPool)
          Start managing a connection.
 void connect(java.lang.String name, java.net.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

static final java.lang.String ROLE
The component role used by components implementing this service

See Also:
Constant Field Values
Method Detail

getMaximumNumberOfOpenConnections

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

Returns:
the maximum number of connections

connect

void connect(java.lang.String name,
             java.net.ServerSocket socket,
             org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory,
             org.apache.excalibur.thread.ThreadPool threadPool,
             int maxOpenConnections)
             throws java.lang.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:
java.lang.Exception - if an error occurs

connect

void connect(java.lang.String name,
             java.net.ServerSocket socket,
             org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory,
             int maxOpenConnections)
             throws java.lang.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:
java.lang.Exception - if an error occurs

connect

void connect(java.lang.String name,
             java.net.ServerSocket socket,
             org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory,
             org.apache.excalibur.thread.ThreadPool threadPool)
             throws java.lang.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:
java.lang.Exception - if an error occurs

connect

void connect(java.lang.String name,
             java.net.ServerSocket socket,
             org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory handlerFactory)
             throws java.lang.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:
java.lang.Exception - if an error occurs


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.