@@ -0,0 +1,3490 @@
+/***********************************************************************%0A * Copyright (c) 2000-2004 The Apache Software Foundation.             *%0A * All rights reserved.                                                *%0A * ------------------------------------------------------------------- *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you *%0A * may not use this file except in compliance with the License. You    *%0A * may obtain a copy of the License at:                                *%0A *                                                                     *%0A *     http://www.apache.org/licenses/LICENSE-2.0                      *%0A *                                                                     *%0A * Unless required by applicable law or agreed to in writing, software *%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,   *%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or     *%0A * implied.  See the License for the specific language governing       *%0A * permissions and limitations under the License.                      *%0A ***********************************************************************/%0A%0A%0Apackage org.apache.james.services;%0A%0A%0Aimport org.apache.avalon.cornerstone.services.connection.ConnectionManager;%0Aimport java.net.ServerSocket;%0Aimport org.apache.excalibur.thread.ThreadPool;%0Aimport org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory;%0A%0A/**%0A * This interface extends the standard ConnectionManager interface to allow%0A * connectionLimits to be specified on a per service basis%0A **/%0Apublic interface JamesConnectionManager extends ConnectionManager%0A%7B%0A    /**%0A     * The component role used by components implementing this service%0A     */%0A    String ROLE = %22org.apache.james.services.JamesConnectionManager%22;%0A%0A    /**%0A     * Returns the default maximum number of open connections supported by this%0A     * SimpleConnectionManager%0A     *%0A     * @return the maximum number of connections%0A     */%0A    int getMaximumNumberOfOpenConnections();%0A%0A    /**%0A     * Start managing a connection.%0A     * Management involves accepting connections and farming them out to threads%0A     * from pool to be handled.%0A     *%0A     * @param name the name of connection%0A     * @param socket the ServerSocket from which to%0A     * @param handlerFactory the factory from which to acquire handlers%0A     * @param threadPool the thread pool to use%0A     * @param maxOpenConnections the maximum number of open connections allowed for this server socket.%0A     * @exception Exception if an error occurs%0A     */%0A    void connect( String name,%0A                  ServerSocket socket,%0A                  ConnectionHandlerFactory handlerFactory,%0A                  ThreadPool threadPool,%0A                  int maxOpenConnections )%0A        throws Exception;%0A    %0A    /**%0A     * Start managing a connection.%0A     * This is similar to other connect method except that it uses default thread pool.%0A     *%0A     * @param name the name of connection%0A     * @param socket the ServerSocket from which to%0A     * @param handlerFactory the factory from which to acquire handlers%0A     * @param maxOpenConnections the maximum number of open connections allowed for this server socket.%0A     * @exception Exception if an error occurs%0A     */%0A    void connect( String name,%0A                  ServerSocket socket,%0A                  ConnectionHandlerFactory handlerFactory,%0A                  int maxOpenConnections )%0A        throws Exception;%0A%0A%7D%0A

use o.a.james.services.JamesConnectionManager from trunk