Return-Path: Delivered-To: apmail-incubator-directory-cvs-archive@www.apache.org Received: (qmail 81290 invoked from network); 13 Dec 2003 23:44:16 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 13 Dec 2003 23:44:16 -0000 Received: (qmail 61383 invoked by uid 500); 13 Dec 2003 23:44:01 -0000 Delivered-To: apmail-incubator-directory-cvs-archive@incubator.apache.org Received: (qmail 61340 invoked by uid 500); 13 Dec 2003 23:44:00 -0000 Mailing-List: contact directory-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: directory-dev@incubator.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list directory-cvs@incubator.apache.org Received: (qmail 61327 invoked from network); 13 Dec 2003 23:44:00 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 13 Dec 2003 23:44:00 -0000 Received: (qmail 81201 invoked by uid 65534); 13 Dec 2003 23:44:13 -0000 Date: 13 Dec 2003 23:44:13 -0000 Message-ID: <20031213234413.81199.qmail@minotaur.apache.org> From: akarasulu@apache.org To: directory-cvs@incubator.apache.org Subject: svn commit: rev 1411 - in incubator/directory/ldap/trunk/eve: . frontend/buffer/impl frontend/buffer/impl/src/java/org/apache/eve/buffer frontend/buffer/spi frontend/buffer/spi/src/java/org/apache/eve/buffer frontend/event/impl frontend/event/impl/src/java/org/apache/eve/event frontend/event/spi frontend/event/spi/src/java/org/apache/eve/event frontend/input/impl frontend/input/impl/src/java/org/apache/eve/input frontend/input/spi frontend/input/spi/src/java/org/apache/eve/input frontend/listener/impl/src/java/org/apache/eve/listener frontend/listener/spi frontend/listener/spi/src/java/org/apache/eve/listener X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Sat Dec 13 15:44:13 2003 New Revision: 1411 Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/maven.xml incubator/directory/ldap/trunk/eve/frontend/buffer/impl/project.xml incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/DefaultBufferPool.java incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPool.java incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPoolMonitor.java incubator/directory/ldap/trunk/eve/frontend/buffer/spi/project.xml incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPool.java incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolConfig.java incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitor.java incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitorAdapter.java incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/DefaultBufferPoolConfig.java incubator/directory/ldap/trunk/eve/frontend/event/impl/maven.xml incubator/directory/ldap/trunk/eve/frontend/event/impl/project.xml incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/DefaultEventRouter.java incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/MerlinEventRouter.java incubator/directory/ldap/trunk/eve/frontend/event/spi/project.xml incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java incubator/directory/ldap/trunk/eve/frontend/input/impl/maven.xml incubator/directory/ldap/trunk/eve/frontend/input/impl/project.xml incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/DefaultInputManager.java incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/MerlinInputManager.java incubator/directory/ldap/trunk/eve/frontend/input/spi/project.xml incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManager.java incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/AvalonListenerManagerMonitor.java incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/DefaultListenerManager.java incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/ListenerManagerMonitorAdapter.java incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/MerlinListenerManager.java incubator/directory/ldap/trunk/eve/frontend/listener/spi/project.xml incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManager.java incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManagerMonitor.java incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ServerListener.java incubator/directory/ldap/trunk/eve/maven.xml incubator/directory/ldap/trunk/eve/project.xml Log: tab cleanups Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/maven.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/impl/maven.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/impl/maven.xml Sat Dec 13 15:44:13 2003 @@ -23,16 +23,16 @@ - - + + - + - + Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/project.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/impl/project.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/impl/project.xml Sat Dec 13 15:44:13 2003 @@ -8,13 +8,13 @@ org.apache.eve.buffer SNAPSHOT 2003 - + - Direct buffer pool implementation used by Eve's frontend + Direct buffer pool implementation used by Eve's frontend - A pool of direct memory buffer pools of fixed size. These resouces + A pool of direct memory buffer pools of fixed size. These resouces are expensive to create and destroy unlike regular memory allocated on the Java heap direct memory buffers are allocated outside of the Java managed memory space. The garbage collector does not apply to Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/DefaultBufferPool.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/DefaultBufferPool.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/DefaultBufferPool.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -68,18 +68,18 @@ public class DefaultBufferPool implements BufferPool { /** a configuration bean */ - private final BufferPoolConfig m_config ; - /** list of currently free buffers */ - private final ArrayList m_freeList ; - /** list of currently in use buffers */ - private final ArrayList m_inUseList ; - /** map of buffers to their interest lists */ - private final HashMap m_interestLists ; - - /** the monitor for this DefaultBufferPool */ - private BufferPoolMonitor m_monitor = new BufferPoolMonitorAdapter() ; - - + private final BufferPoolConfig m_config ; + /** list of currently free buffers */ + private final ArrayList m_freeList ; + /** list of currently in use buffers */ + private final ArrayList m_inUseList ; + /** map of buffers to their interest lists */ + private final HashMap m_interestLists ; + + /** the monitor for this DefaultBufferPool */ + private BufferPoolMonitor m_monitor = new BufferPoolMonitorAdapter() ; + + /** * Creates a BufferPool using a pool configuration bean. * @@ -89,19 +89,19 @@ { super() ; - m_config = a_config ; + m_config = a_config ; m_freeList = new ArrayList( a_config.getIncrement() ) ; m_inUseList = new ArrayList( a_config.getIncrement() ) ; m_interestLists = new HashMap( a_config.getIncrement() ) ; for( int ii = 0; ii < m_config.getInitialSize(); ii++ ) { - ByteBuffer l_buf = ByteBuffer.allocateDirect( m_config - .getBufferSize() ) ; - m_freeList.add( l_buf ) ; - - // create interest lists in advance for the buffers - m_interestLists.put( l_buf, new ArrayList( 3 ) ) ; + ByteBuffer l_buf = ByteBuffer.allocateDirect( m_config + .getBufferSize() ) ; + m_freeList.add( l_buf ) ; + + // create interest lists in advance for the buffers + m_interestLists.put( l_buf, new ArrayList( 3 ) ) ; } } @@ -110,39 +110,39 @@ * @see org.apache.eve.buffer.BufferPool#getBuffer(java.lang.Object) */ public synchronized ByteBuffer getBuffer( Object a_party ) - throws ResourceException + throws ResourceException { - ByteBuffer l_buf = null ; - + ByteBuffer l_buf = null ; + if ( m_freeList.size() == 0 ) { - if ( ( m_freeList.size() + m_config.getIncrement() ) <= - m_config.getMaximumSize() ) - { - for ( int ii = 0; ii < m_config.getIncrement(); ii++ ) - { - l_buf = ByteBuffer.allocateDirect( m_config - .getBufferSize() ) ; - m_interestLists.put( l_buf, new ArrayList( 3 ) ) ; - } - } - else - { - m_monitor.resourceUnavailable( this, a_party ) ; - throw new ResourceException( "Free Buffers unavailable" ) ; - } + if ( ( m_freeList.size() + m_config.getIncrement() ) <= + m_config.getMaximumSize() ) + { + for ( int ii = 0; ii < m_config.getIncrement(); ii++ ) + { + l_buf = ByteBuffer.allocateDirect( m_config + .getBufferSize() ) ; + m_interestLists.put( l_buf, new ArrayList( 3 ) ) ; + } + } + else + { + m_monitor.resourceUnavailable( this, a_party ) ; + throw new ResourceException( "Free Buffers unavailable" ) ; + } } // remove from free list and add to in use list then report to monitir l_buf = ( ByteBuffer ) m_freeList.remove( 0 ) ; m_inUseList.add( l_buf ) ; - m_monitor.bufferTaken( this, l_buf, a_party ) ; + m_monitor.bufferTaken( this, l_buf, a_party ) ; - // claim interest on the buffer automatically then report to monitor - ArrayList l_list = ( ArrayList ) m_interestLists.get( l_buf ) ; - l_list.add( a_party ) ; - m_monitor.interestClaimed( this, l_buf, a_party ) ; - return l_buf ; + // claim interest on the buffer automatically then report to monitor + ArrayList l_list = ( ArrayList ) m_interestLists.get( l_buf ) ; + l_list.add( a_party ) ; + m_monitor.interestClaimed( this, l_buf, a_party ) ; + return l_buf ; } @@ -151,11 +151,11 @@ * java.lang.Object) */ public synchronized void claimInterest( ByteBuffer a_buffer, - Object a_party ) + Object a_party ) { if ( ! m_interestLists.containsKey( a_buffer ) ) { - m_monitor.nonPooledBuffer( this, a_buffer, a_party ) ; + m_monitor.nonPooledBuffer( this, a_buffer, a_party ) ; throw new IllegalStateException( "Not a BufferPool resource" ) ; } @@ -171,31 +171,31 @@ */ public synchronized void releaseClaim( ByteBuffer a_buffer, Object a_party ) { - if ( ! m_interestLists.containsKey( a_buffer ) ) - { - m_monitor.nonPooledBuffer( this, a_buffer, a_party ) ; - throw new IllegalStateException( "Not a BufferPool resource" ) ; - } - - ArrayList l_list = ( ArrayList ) m_interestLists.get( a_buffer ) ; - - if ( ! l_list.contains( a_party ) ) - { - m_monitor.unregisteredParty( this, a_buffer, a_party ) ; - throw new IllegalStateException( - "Party never registered interest with buffer" ) ; - } - - l_list.remove( a_party ) ; - m_monitor.interestReleased( this, a_buffer, a_party ) ; - - // if the list of interested parties hits zero then we release buf - if ( l_list.size() == 0 ) - { + if ( ! m_interestLists.containsKey( a_buffer ) ) + { + m_monitor.nonPooledBuffer( this, a_buffer, a_party ) ; + throw new IllegalStateException( "Not a BufferPool resource" ) ; + } + + ArrayList l_list = ( ArrayList ) m_interestLists.get( a_buffer ) ; + + if ( ! l_list.contains( a_party ) ) + { + m_monitor.unregisteredParty( this, a_buffer, a_party ) ; + throw new IllegalStateException( + "Party never registered interest with buffer" ) ; + } + + l_list.remove( a_party ) ; + m_monitor.interestReleased( this, a_buffer, a_party ) ; + + // if the list of interested parties hits zero then we release buf + if ( l_list.size() == 0 ) + { m_inUseList.remove( a_buffer ) ; m_freeList.add( a_buffer ) ; m_monitor.bufferReleased( this, a_buffer, a_party ) ; - } + } } @@ -205,7 +205,7 @@ */ public BufferPoolConfig getConfig() { - return m_config ; + return m_config ; } Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPool.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPool.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPool.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -81,9 +81,9 @@ private BufferPoolConfig m_config = null ; - // ------------------------------------------------------------------------ - // BufferPool Interface Methods - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ + // BufferPool Interface Methods + // ------------------------------------------------------------------------ /* (non-Javadoc) @@ -124,9 +124,9 @@ } - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ // Avalon Life Cycle Methods - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ /* (non-Javadoc) @@ -135,8 +135,8 @@ public void initialize() throws Exception { m_bp = new DefaultBufferPool( m_config ) ; - MerlinBufferPoolMonitor l_monitor = new MerlinBufferPoolMonitor() ; - l_monitor.enableLogging( getLogger() ) ; + MerlinBufferPoolMonitor l_monitor = new MerlinBufferPoolMonitor() ; + l_monitor.enableLogging( getLogger() ) ; m_bp.setMonitor( l_monitor ) ; } @@ -146,17 +146,17 @@ * org.apache.avalon.framework.configuration.Configuration) */ public void configure( Configuration a_config ) - throws ConfigurationException + throws ConfigurationException { int l_max = Integer.parseInt( a_config .getChild( "maximum" ).getValue() ) ; - int l_ini = Integer.parseInt( a_config - .getChild( "initial" ).getValue() ) ; - int l_inc = Integer.parseInt( a_config - .getChild( "increment" ).getValue() ) ; - int l_size = Integer.parseInt( a_config - .getChild( "bufferSize" ).getValue() ) ; - - m_config = new DefaultBufferPoolConfig( l_inc, l_max, l_ini, l_size ) ; + int l_ini = Integer.parseInt( a_config + .getChild( "initial" ).getValue() ) ; + int l_inc = Integer.parseInt( a_config + .getChild( "increment" ).getValue() ) ; + int l_size = Integer.parseInt( a_config + .getChild( "bufferSize" ).getValue() ) ; + + m_config = new DefaultBufferPoolConfig( l_inc, l_max, l_ini, l_size ) ; } } Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPoolMonitor.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPoolMonitor.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/impl/src/java/org/apache/eve/buffer/MerlinBufferPoolMonitor.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -64,80 +64,80 @@ extends AbstractLogEnabled implements BufferPoolMonitor { - /* (non-Javadoc) - * @see org.apache.eve.buffer.BufferPoolMonitor#augmented( - * org.apache.eve.buffer.BufferPool) - */ - public void augmented( BufferPool a_bp ) - { - } + /* (non-Javadoc) + * @see org.apache.eve.buffer.BufferPoolMonitor#augmented( + * org.apache.eve.buffer.BufferPool) + */ + public void augmented( BufferPool a_bp ) + { + } - /* (non-Javadoc) - * @see org.apache.eve.buffer.BufferPoolMonitor#bufferTaken( - * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) - */ - public void bufferTaken( BufferPool a_bp, ByteBuffer a_buffer, - Object a_taker ) - { - } + /* (non-Javadoc) + * @see org.apache.eve.buffer.BufferPoolMonitor#bufferTaken( + * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) + */ + public void bufferTaken( BufferPool a_bp, ByteBuffer a_buffer, + Object a_taker ) + { + } - /* (non-Javadoc) - * @see org.apache.eve.buffer.BufferPoolMonitor#bufferReleased( - * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) - */ - public void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer, - Object a_releaser ) - { - } + /* (non-Javadoc) + * @see org.apache.eve.buffer.BufferPoolMonitor#bufferReleased( + * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) + */ + public void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer, + Object a_releaser ) + { + } - /* (non-Javadoc) - * @see org.apache.eve.buffer.BufferPoolMonitor#interestClaimed( - * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) - */ - public void interestClaimed( BufferPool a_bp, ByteBuffer a_buffer, - Object a_claimer ) - { - } + /* (non-Javadoc) + * @see org.apache.eve.buffer.BufferPoolMonitor#interestClaimed( + * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) + */ + public void interestClaimed( BufferPool a_bp, ByteBuffer a_buffer, + Object a_claimer ) + { + } - /* (non-Javadoc) - * @see org.apache.eve.buffer.BufferPoolMonitor#interestReleased( - * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) - */ - public void interestReleased( BufferPool a_bp, ByteBuffer a_buffer, - Object a_releaser ) - { - } - - /* - * (non-Javadoc) - * @see org.apache.eve.buffer.BufferPoolMonitor#resourceUnavailable( - * org.apache.eve.buffer.BufferPool, java.lang.Object) - */ - public void resourceUnavailable( BufferPool a_bp, Object a_party ) - { - } - - /* - * (non-Javadoc) - * @see org.apache.eve.buffer.BufferPoolMonitor#unregisteredParty( - * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) - */ - public void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, - Object a_party ) - { - } + /* (non-Javadoc) + * @see org.apache.eve.buffer.BufferPoolMonitor#interestReleased( + * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) + */ + public void interestReleased( BufferPool a_bp, ByteBuffer a_buffer, + Object a_releaser ) + { + } + + /* + * (non-Javadoc) + * @see org.apache.eve.buffer.BufferPoolMonitor#resourceUnavailable( + * org.apache.eve.buffer.BufferPool, java.lang.Object) + */ + public void resourceUnavailable( BufferPool a_bp, Object a_party ) + { + } + + /* + * (non-Javadoc) + * @see org.apache.eve.buffer.BufferPoolMonitor#unregisteredParty( + * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) + */ + public void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, + Object a_party ) + { + } - /* - * (non-Javadoc) - * @see org.apache.eve.buffer.BufferPoolMonitor#nonPooledBuffer( - * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) - */ - public void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, - Object a_party ) - { - } + /* + * (non-Javadoc) + * @see org.apache.eve.buffer.BufferPoolMonitor#nonPooledBuffer( + * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) + */ + public void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, + Object a_party ) + { + } } Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/project.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/project.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/project.xml Sat Dec 13 15:44:13 2003 @@ -8,7 +8,7 @@ org.apache.eve.buffer SNAPSHOT 2003 - + Event Buffer Pool SPI used by Eve's frontend @@ -17,7 +17,7 @@ the buffer as which is used to maintain a reference count on the buffer but with actual references. - + directory Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPool.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPool.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPool.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolConfig.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolConfig.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolConfig.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -71,14 +71,14 @@ * * @return the size of the pooled buffers */ - int getBufferSize() ; - - /** - * Gets the initial size of the pool. This should be a multiple of the - * pool's growth increment. - * - * @return the initial pool size. - */ + int getBufferSize() ; + + /** + * Gets the initial size of the pool. This should be a multiple of the + * pool's growth increment. + * + * @return the initial pool size. + */ int getInitialSize() ; /** Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitor.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitor.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitor.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -86,55 +86,55 @@ * @param a_releaser the object doing the releasing */ void bufferReleased( BufferPool a_bp, ByteBuffer a_buffer, - Object a_releaser ) ; + Object a_releaser ) ; - /** - * Monitors the claim of interest in a buffer. - * - * @param a_bp the BufferPool the buffer of interest is from - * @param a_buffer the buffer that is the interest - * @param a_claimer the object doing the interest claiming - */ - void interestClaimed( BufferPool a_bp, ByteBuffer a_buffer, - Object a_claimer ) ; - - /** - * Monitors the release of a claim on a buffer. - * - * @param a_bp the BufferPool the buffer of interest is from - * @param a_buffer the buffer that has an interest claim released - * @param a_releaser the object doing the interest claim releasing - */ - void interestReleased( BufferPool a_bp, ByteBuffer a_buffer, - Object a_releaser ) ; - - /** - * Monitors situations where the BufferPool is in full use at its maximum - * capacity and a request for a Buffer cannot be satisfied. - * - * @param a_bp the BufferPool the where the buffer is unavailable - * @param a_party the party trying to acquire the buffer resource - */ - void resourceUnavailable( BufferPool a_bp, Object a_party ) ; - - /** - * A party that never registered interest in a buffer is attempting to - * remove its interest on a buffer. - * - * @param a_bp the buffer pool this fault is occuring in - * @param a_buffer the buffer the party is trying to claim interest on - * @param a_party the party trying to claim interest - */ - void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, - Object a_party ) ; - - /** - * Monitors attempts to deal with a buffer that is not a pooled resource. - * - * @param a_bp the BufferPool that does not contain the buffer - * @param a_buffer the buffer that is not pooled in the BufferPool - * @param a_party the party that attempted the operation causing the fault - */ - void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, - Object a_party ) ; + /** + * Monitors the claim of interest in a buffer. + * + * @param a_bp the BufferPool the buffer of interest is from + * @param a_buffer the buffer that is the interest + * @param a_claimer the object doing the interest claiming + */ + void interestClaimed( BufferPool a_bp, ByteBuffer a_buffer, + Object a_claimer ) ; + + /** + * Monitors the release of a claim on a buffer. + * + * @param a_bp the BufferPool the buffer of interest is from + * @param a_buffer the buffer that has an interest claim released + * @param a_releaser the object doing the interest claim releasing + */ + void interestReleased( BufferPool a_bp, ByteBuffer a_buffer, + Object a_releaser ) ; + + /** + * Monitors situations where the BufferPool is in full use at its maximum + * capacity and a request for a Buffer cannot be satisfied. + * + * @param a_bp the BufferPool the where the buffer is unavailable + * @param a_party the party trying to acquire the buffer resource + */ + void resourceUnavailable( BufferPool a_bp, Object a_party ) ; + + /** + * A party that never registered interest in a buffer is attempting to + * remove its interest on a buffer. + * + * @param a_bp the buffer pool this fault is occuring in + * @param a_buffer the buffer the party is trying to claim interest on + * @param a_party the party trying to claim interest + */ + void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, + Object a_party ) ; + + /** + * Monitors attempts to deal with a buffer that is not a pooled resource. + * + * @param a_bp the BufferPool that does not contain the buffer + * @param a_buffer the buffer that is not pooled in the BufferPool + * @param a_party the party that attempted the operation causing the fault + */ + void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, + Object a_party ) ; } Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitorAdapter.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitorAdapter.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/BufferPoolMonitorAdapter.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -108,7 +108,7 @@ * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) */ public void interestReleased( BufferPool a_bp, ByteBuffer a_buffer, - Object a_releaser ) + Object a_releaser ) { } @@ -127,7 +127,7 @@ * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) */ public void unregisteredParty( BufferPool a_bp, ByteBuffer a_buffer, - Object a_party ) + Object a_party ) { } @@ -136,8 +136,8 @@ * @see org.apache.eve.buffer.BufferPoolMonitor#nonPooledBuffer( * org.apache.eve.buffer.BufferPool, java.nio.ByteBuffer, java.lang.Object) */ - public void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, - Object a_party ) - { - } + public void nonPooledBuffer( BufferPool a_bp, ByteBuffer a_buffer, + Object a_party ) + { + } } Modified: incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/DefaultBufferPoolConfig.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/DefaultBufferPoolConfig.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/buffer/spi/src/java/org/apache/eve/buffer/DefaultBufferPoolConfig.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -63,8 +63,8 @@ /** the maximum pool size */ private int m_max = 0 ; /** the initial pool size */ - private int m_ini = 0 ; - /** the size of the buffers pooled */ + private int m_ini = 0 ; + /** the size of the buffers pooled */ private int m_size = 0 ; @@ -77,7 +77,7 @@ * @param a_size the size of the buffers pooled */ public DefaultBufferPoolConfig( int a_inc, int a_max, int a_ini, - int a_size ) + int a_size ) { m_inc = a_inc ; m_max = a_max ; Modified: incubator/directory/ldap/trunk/eve/frontend/event/impl/maven.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/impl/maven.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/impl/maven.xml Sat Dec 13 15:44:13 2003 @@ -23,16 +23,16 @@ - - + + - + - + Modified: incubator/directory/ldap/trunk/eve/frontend/event/impl/project.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/impl/project.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/impl/project.xml Sat Dec 13 15:44:13 2003 @@ -8,15 +8,15 @@ org.apache.eve.event SNAPSHOT 2003 - + - Event router implementation used by Eve's frontend + Event router implementation used by Eve's frontend - Event notification service implementation. + Event notification service implementation. - + avalon-framework Modified: incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/DefaultEventRouter.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/DefaultEventRouter.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/DefaultEventRouter.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -76,26 +76,26 @@ * org.apache.eve.event.Filter, org.apache.eve.event.Subscriber) */ public void subscribe( Class a_type, Filter a_filter, - Subscriber a_subscriber ) + Subscriber a_subscriber ) { - if ( ! EventObject.class.isAssignableFrom( a_type ) ) - { - throw new IllegalArgumentException( "Invalid event class: " - + a_type.getName() ) ; - } - - Subscription l_subscription = - new Subscription( a_type, a_filter, a_subscriber ) ; - - if ( ! m_subscriptions.contains( l_subscription ) ) - { - synchronized ( m_subscriptions ) - { - m_subscriptions.add( l_subscription ) ; - } - - m_monitor.addedSubscription( l_subscription ) ; - } + if ( ! EventObject.class.isAssignableFrom( a_type ) ) + { + throw new IllegalArgumentException( "Invalid event class: " + + a_type.getName() ) ; + } + + Subscription l_subscription = + new Subscription( a_type, a_filter, a_subscriber ) ; + + if ( ! m_subscriptions.contains( l_subscription ) ) + { + synchronized ( m_subscriptions ) + { + m_subscriptions.add( l_subscription ) ; + } + + m_monitor.addedSubscription( l_subscription ) ; + } } @@ -107,68 +107,68 @@ { Iterator l_list = m_subscriptions.iterator() ; - synchronized ( m_subscriptions ) - { - while ( l_list.hasNext() ) - { - Subscription l_subscription = ( Subscription ) l_list.next() ; - if ( a_subscriber == l_subscription.getSubscriber() ) - { - l_list.remove() ; - m_monitor.removedSubscription( l_subscription ) ; - } - } - } + synchronized ( m_subscriptions ) + { + while ( l_list.hasNext() ) + { + Subscription l_subscription = ( Subscription ) l_list.next() ; + if ( a_subscriber == l_subscription.getSubscriber() ) + { + l_list.remove() ; + m_monitor.removedSubscription( l_subscription ) ; + } + } + } + } + + + /** + * (non-Javadoc) + * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, + * org.apache.eve.event.Subscriber) + */ + public void unsubscribe( Class a_type, Subscriber a_subscriber ) + { + Iterator l_list = m_subscriptions.iterator() ; + + synchronized ( m_subscriptions ) + { + while ( l_list.hasNext() ) + { + Subscription l_subscription = ( Subscription ) l_list.next() ; + if ( a_subscriber == l_subscription.getSubscriber() + && a_type.equals( l_subscription.getType() ) ) + { + l_list.remove() ; + m_monitor.removedSubscription( l_subscription ) ; + } + } + } } - /** - * (non-Javadoc) - * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, - * org.apache.eve.event.Subscriber) - */ - public void unsubscribe( Class a_type, Subscriber a_subscriber ) - { - Iterator l_list = m_subscriptions.iterator() ; + /** + * (non-Javadoc) + * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, + * org.apache.eve.event.Subscriber) + */ + public void unsubscribe( Class a_type, Filter a_filter, + Subscriber a_subscriber ) + { + if ( ! EventObject.class.isAssignableFrom( a_type ) ) + { + throw new IllegalArgumentException( "Invalid event class: " + + a_type.getName() ) ; + } - synchronized ( m_subscriptions ) - { - while ( l_list.hasNext() ) - { - Subscription l_subscription = ( Subscription ) l_list.next() ; - if ( a_subscriber == l_subscription.getSubscriber() - && a_type.equals( l_subscription.getType() ) ) - { - l_list.remove() ; - m_monitor.removedSubscription( l_subscription ) ; - } - } - } - } - - - /** - * (non-Javadoc) - * @see org.apache.eve.event.EventRouter#unsubscribe(java.lang.Class, - * org.apache.eve.event.Subscriber) - */ - public void unsubscribe( Class a_type, Filter a_filter, - Subscriber a_subscriber ) - { - if ( ! EventObject.class.isAssignableFrom( a_type ) ) - { - throw new IllegalArgumentException( "Invalid event class: " - + a_type.getName() ) ; - } - - final Subscription l_subscription = new Subscription( a_type, a_filter, - a_subscriber ) ; + final Subscription l_subscription = new Subscription( a_type, a_filter, + a_subscriber ) ; - synchronized ( m_subscriptions ) - { - m_subscriptions.remove( l_subscription ) ; - } - } + synchronized ( m_subscriptions ) + { + m_subscriptions.remove( l_subscription ) ; + } + } /** @@ -182,13 +182,13 @@ synchronized ( m_subscriptions ) { l_subscriptions = ( Subscription [] ) m_subscriptions - .toArray( new Subscription [ m_subscriptions.size() ] ) ; + .toArray( new Subscription [ m_subscriptions.size() ] ) ; } for ( int ii = 0; ii < l_subscriptions.length; ii++ ) { boolean isAssignable = l_subscriptions[ii].getType() - .isAssignableFrom( a_event.getClass() ) ; + .isAssignableFrom( a_event.getClass() ) ; if ( ! isAssignable ) { @@ -197,18 +197,18 @@ if ( l_subscriptions[ii].getFilter() != null && l_subscriptions[ii].getFilter().apply( a_event ) ) - { - l_subscriptions[ii].getSubscriber().inform( a_event ) ; - } + { + l_subscriptions[ii].getSubscriber().inform( a_event ) ; + } } } - /** - * Sets the event router's monitor. - * - * @param a_monitor the monitor - */ + /** + * Sets the event router's monitor. + * + * @param a_monitor the monitor + */ public void setMonitor( EventRouterMonitor a_monitor ) { m_monitor = a_monitor ; Modified: incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/MerlinEventRouter.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/MerlinEventRouter.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/impl/src/java/org/apache/eve/event/MerlinEventRouter.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -68,17 +68,17 @@ * @version $Revision$ */ public class MerlinEventRouter extends AbstractLogEnabled - implements + implements EventRouter, - Initializable + Initializable { /** the default EventRouter implementation we wrap */ private DefaultEventRouter m_router ; - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ // EventRouter Methods - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ /* (non-Javadoc) @@ -123,9 +123,9 @@ } - // ------------------------------------------------------------------------ - // Avalon Life Cycle Methods - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ + // Avalon Life Cycle Methods + // ------------------------------------------------------------------------ /* @@ -139,9 +139,9 @@ } - // ------------------------------------------------------------------------ - // Avalon specific EventRouterMonitor - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ + // Avalon specific EventRouterMonitor + // ------------------------------------------------------------------------ /** @@ -153,33 +153,33 @@ */ class Monitor implements EventRouterMonitor { - /* (non-Javadoc) - * @see org.apache.eve.event.EventRouterMonitor#eventPublished( - * java.util.EventObject) - */ - public void eventPublished( EventObject a_event ) - { - getLogger().debug( "published event: " + a_event ) ; - } - - - /* (non-Javadoc) - * @see org.apache.eve.event.EventRouterMonitor#addedSubscription( - * org.apache.eve.event.Subscription) - */ - public void addedSubscription( Subscription a_subscription ) - { - getLogger().debug( "added subscription: " + a_subscription ) ; - } - - - /* (non-Javadoc) - * @see org.apache.eve.event.EventRouterMonitor#removedSubscription( - * org.apache.eve.event.Subscription) - */ - public void removedSubscription( Subscription a_subscription ) - { - getLogger().debug( "removed subscription: " + a_subscription ) ; - } + /* (non-Javadoc) + * @see org.apache.eve.event.EventRouterMonitor#eventPublished( + * java.util.EventObject) + */ + public void eventPublished( EventObject a_event ) + { + getLogger().debug( "published event: " + a_event ) ; + } + + + /* (non-Javadoc) + * @see org.apache.eve.event.EventRouterMonitor#addedSubscription( + * org.apache.eve.event.Subscription) + */ + public void addedSubscription( Subscription a_subscription ) + { + getLogger().debug( "added subscription: " + a_subscription ) ; + } + + + /* (non-Javadoc) + * @see org.apache.eve.event.EventRouterMonitor#removedSubscription( + * org.apache.eve.event.Subscription) + */ + public void removedSubscription( Subscription a_subscription ) + { + getLogger().debug( "removed subscription: " + a_subscription ) ; + } } } Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/project.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/spi/project.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/spi/project.xml Sat Dec 13 15:44:13 2003 @@ -8,14 +8,14 @@ org.apache.eve.event SNAPSHOT 2003 - + Event SPI used by Eve's frontend - Event notification service interfaces used to implement - event an event router within the server. + Event notification service interfaces used to implement + event an event router within the server. - + avalon-framework Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouter.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -66,29 +66,29 @@ /** Avalon compliant service interface role */ String ROLE = EventRouter.class.getName() ; - /** - * Subscribes an event subscriber. - * - * @param a_type an event type enumeration value - * @param a_filter an event filter if any to apply - * @param a_subscriber the Subscriber to subscribe - */ - void subscribe( Class a_type, Filter a_filter, - Subscriber a_subscriber ) ; + /** + * Subscribes an event subscriber. + * + * @param a_type an event type enumeration value + * @param a_filter an event filter if any to apply + * @param a_subscriber the Subscriber to subscribe + */ + void subscribe( Class a_type, Filter a_filter, + Subscriber a_subscriber ) ; - /** - * Unsubscribes an event subscriber. - * - * @param a_subscriber the Subscriber to unsubscribe - */ - void unsubscribe( Subscriber a_subscriber ) ; + /** + * Unsubscribes an event subscriber. + * + * @param a_subscriber the Subscriber to unsubscribe + */ + void unsubscribe( Subscriber a_subscriber ) ; - /** - * Unsubscribes an event subscriber. - * - * @param a_subscriber the Subscriber to unsubscribe - */ - void unsubscribe( Class a_type, Subscriber a_subscriber ) ; + /** + * Unsubscribes an event subscriber. + * + * @param a_subscriber the Subscriber to unsubscribe + */ + void unsubscribe( Class a_type, Subscriber a_subscriber ) ; /** * Fires an event synchronously in the thread of the caller to all Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitor.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/EventRouterMonitorAdapter.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Filter.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. Modified: incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/event/spi/src/java/org/apache/eve/event/Subscription.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -60,127 +60,127 @@ public class Subscription { /** the filter if any used to filter out events */ - private final Filter m_filter ; - /** the event class */ - private final Class m_type ; - /** the subscriber */ - private final Subscriber m_subscriber ; - - - /** - * Creates a subscription for a type of event using a filter and a - * subscriber. - * - * @param a_type the class of event to be informed on - * @param a_filter the Filter to use weed out unwanted events - * @param a_subscriber the subscriber to deliever the event to - */ - public Subscription( Class a_type, Filter a_filter, - Subscriber a_subscriber ) - { - m_type = a_type ; - m_filter = a_filter ; - m_subscriber = a_subscriber ; - } - - - /** - * Get the event class/type - * - * @return the event class/type - */ - public Class getType() - { - return m_type ; - } - - - /** - * Get the filter used with this subscription. - * - * @return The filter - */ - public Filter getFilter() - { - return m_filter ; - } - - - /** - * Get the subscriber. - * - * @return the subscriber - */ - public Subscriber getSubscriber() - { - return m_subscriber ; - } - - - /** - * Compare two Subscriptions to each other. - * - * @param a_obj the object to compare this Subscription to - * @return true if the two Subscription objects are the same - */ - public boolean equals( Object a_obj ) - { - if ( this == a_obj ) - { - return true ; - } - - if ( ! ( a_obj instanceof Subscription ) ) - { - return false ; - } - - final Subscription l_subscription = ( Subscription ) a_obj ; - - if ( ! m_type.equals( l_subscription.getType() ) ) - { - return false ; - } - - if ( m_filter != null ) - { - if ( l_subscription.getFilter() == null ) - { - return false ; - } - - if ( ! m_filter.equals( l_subscription.getFilter() ) ) - { - return false ; - } - } - - if ( ! m_subscriber.equals( l_subscription.getSubscriber() ) ) - { - return false ; - } - - return true ; - } - - - /** - * Get the hashcode (used in HashMaps). - * - * hashCode = 37 * (37 * (629 + event.hashCode()) + filter.hashCode()) - * + subscriber.hashCode() - * - * This method was borrowed from Berin Loritsch. - * - * @return the hashCode value - */ - public int hashCode() - { - int l_result = 17 ; - l_result = 37 * l_result + m_type.hashCode() ; - l_result = 37 * l_result + - ( m_filter != null ? m_filter.hashCode() : 0 ) ; - l_result = 37 * l_result + m_subscriber.hashCode() ; - return l_result ; - } + private final Filter m_filter ; + /** the event class */ + private final Class m_type ; + /** the subscriber */ + private final Subscriber m_subscriber ; + + + /** + * Creates a subscription for a type of event using a filter and a + * subscriber. + * + * @param a_type the class of event to be informed on + * @param a_filter the Filter to use weed out unwanted events + * @param a_subscriber the subscriber to deliever the event to + */ + public Subscription( Class a_type, Filter a_filter, + Subscriber a_subscriber ) + { + m_type = a_type ; + m_filter = a_filter ; + m_subscriber = a_subscriber ; + } + + + /** + * Get the event class/type + * + * @return the event class/type + */ + public Class getType() + { + return m_type ; + } + + + /** + * Get the filter used with this subscription. + * + * @return The filter + */ + public Filter getFilter() + { + return m_filter ; + } + + + /** + * Get the subscriber. + * + * @return the subscriber + */ + public Subscriber getSubscriber() + { + return m_subscriber ; + } + + + /** + * Compare two Subscriptions to each other. + * + * @param a_obj the object to compare this Subscription to + * @return true if the two Subscription objects are the same + */ + public boolean equals( Object a_obj ) + { + if ( this == a_obj ) + { + return true ; + } + + if ( ! ( a_obj instanceof Subscription ) ) + { + return false ; + } + + final Subscription l_subscription = ( Subscription ) a_obj ; + + if ( ! m_type.equals( l_subscription.getType() ) ) + { + return false ; + } + + if ( m_filter != null ) + { + if ( l_subscription.getFilter() == null ) + { + return false ; + } + + if ( ! m_filter.equals( l_subscription.getFilter() ) ) + { + return false ; + } + } + + if ( ! m_subscriber.equals( l_subscription.getSubscriber() ) ) + { + return false ; + } + + return true ; + } + + + /** + * Get the hashcode (used in HashMaps). + * + * hashCode = 37 * (37 * (629 + event.hashCode()) + filter.hashCode()) + * + subscriber.hashCode() + * + * This method was borrowed from Berin Loritsch. + * + * @return the hashCode value + */ + public int hashCode() + { + int l_result = 17 ; + l_result = 37 * l_result + m_type.hashCode() ; + l_result = 37 * l_result + + ( m_filter != null ? m_filter.hashCode() : 0 ) ; + l_result = 37 * l_result + m_subscriber.hashCode() ; + return l_result ; + } } Modified: incubator/directory/ldap/trunk/eve/frontend/input/impl/maven.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/impl/maven.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/impl/maven.xml Sat Dec 13 15:44:13 2003 @@ -23,16 +23,16 @@ - - + + - + - + Modified: incubator/directory/ldap/trunk/eve/frontend/input/impl/project.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/impl/project.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/impl/project.xml Sat Dec 13 15:44:13 2003 @@ -8,9 +8,9 @@ org.apache.eve.input SNAPSHOT 2003 - + - Eve's Frontend InputManager Implementation + Eve's Frontend InputManager Implementation @@ -18,7 +18,7 @@ the server. The input manager responds to input events enqueued by the listener modules which detects io to read from the socket channel. - + avalon-framework Modified: incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -63,7 +63,7 @@ * @version $Revision$ */ public class AvalonInputManagerMonitor extends InputManagerMonitorAdapter - implements LogEnabled + implements LogEnabled { /** the logger used to log messages */ private Logger m_log ; Modified: incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/DefaultInputManager.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/DefaultInputManager.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/DefaultInputManager.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -78,305 +78,305 @@ */ public class DefaultInputManager implements InputManager { - /** the thread driving this Runnable */ - private Thread m_thread = null ; - /** parameter used to politely stop running thread */ - private Boolean m_hasStarted = null ; + /** the thread driving this Runnable */ + private Thread m_thread = null ; + /** parameter used to politely stop running thread */ + private Boolean m_hasStarted = null ; /** the buffer pool we get direct buffers from */ - private BufferPool m_bp = null ; - /** event router used to decouple source to sink relationships */ - private EventRouter m_router = null ; - /** selector used to select a ready socket channel */ - private Selector m_selector = null ; - /** the input manager's monitor */ - private InputManagerMonitor m_monitor = new InputManagerMonitorAdapter() ; - - - // ------------------------------------------------------------------------ - // C O N S T R U C T O R S - // ------------------------------------------------------------------------ - - - /** - * Creates a default InputManager implementation - * - * @param a_router an event router service - * @param a_bp a buffer pool service - */ - public DefaultInputManager( EventRouter a_router, BufferPool a_bp ) - throws IOException - { - m_bp = a_bp ; - m_router = a_router ; - m_hasStarted = new Boolean( false ) ; - m_selector = Selector.open() ; - } - + private BufferPool m_bp = null ; + /** event router used to decouple source to sink relationships */ + private EventRouter m_router = null ; + /** selector used to select a ready socket channel */ + private Selector m_selector = null ; + /** the input manager's monitor */ + private InputManagerMonitor m_monitor = new InputManagerMonitorAdapter() ; + + + // ------------------------------------------------------------------------ + // C O N S T R U C T O R S + // ------------------------------------------------------------------------ + + + /** + * Creates a default InputManager implementation + * + * @param a_router an event router service + * @param a_bp a buffer pool service + */ + public DefaultInputManager( EventRouter a_router, BufferPool a_bp ) + throws IOException + { + m_bp = a_bp ; + m_router = a_router ; + m_hasStarted = new Boolean( false ) ; + m_selector = Selector.open() ; + } + // ------------------------------------------------------------------------ // start, stop and runnable code // ------------------------------------------------------------------------ - /** - * Runnable used to drive the selection loop. - * - * @author Alex Karasulu - * @author $Author$ - * @version $Revision$ - */ - class SelectionDriver implements Runnable - { - public void run() - { - while ( m_hasStarted.booleanValue() ) - { - int l_count = 0 ; - - /* - * check if we have input waiting and continue if there is - * nothing to read from any of the registered channels - */ - try - { - if ( 0 == ( l_count = m_selector.select( 100 ) ) ) - { - m_monitor.selectorReturned( m_selector ) ; - continue ; - } - } - catch( IOException e ) - { - m_monitor.selectFailure( m_selector, e ) ; - continue ; - } - - processInput() ; - } - } - } - - - /** - * Starts up this module. - */ - public void start() - { - synchronized( m_hasStarted ) - { - if ( m_hasStarted.booleanValue() ) - { - throw new IllegalStateException( "Already started!" ) ; - } + /** + * Runnable used to drive the selection loop. + * + * @author Alex Karasulu + * @author $Author$ + * @version $Revision$ + */ + class SelectionDriver implements Runnable + { + public void run() + { + while ( m_hasStarted.booleanValue() ) + { + int l_count = 0 ; + + /* + * check if we have input waiting and continue if there is + * nothing to read from any of the registered channels + */ + try + { + if ( 0 == ( l_count = m_selector.select( 100 ) ) ) + { + m_monitor.selectorReturned( m_selector ) ; + continue ; + } + } + catch( IOException e ) + { + m_monitor.selectFailure( m_selector, e ) ; + continue ; + } + + processInput() ; + } + } + } + + + /** + * Starts up this module. + */ + public void start() + { + synchronized( m_hasStarted ) + { + if ( m_hasStarted.booleanValue() ) + { + throw new IllegalStateException( "Already started!" ) ; + } - m_hasStarted = new Boolean( true ) ; - m_thread = new Thread( new SelectionDriver() ) ; - m_thread.start() ; - } - } + m_hasStarted = new Boolean( true ) ; + m_thread = new Thread( new SelectionDriver() ) ; + m_thread.start() ; + } + } - /** - * Blocks calling thread until this module gracefully stops. - */ - public void stop() throws InterruptedException - { - synchronized( m_hasStarted ) - { - m_hasStarted = new Boolean( false ) ; + /** + * Blocks calling thread until this module gracefully stops. + */ + public void stop() throws InterruptedException + { + synchronized( m_hasStarted ) + { + m_hasStarted = new Boolean( false ) ; - while ( m_thread.isAlive() ) - { - Thread.sleep( 100 ) ; - } - } - } - - - // ------------------------------------------------------------------------ - // subscriber methods - // ------------------------------------------------------------------------ - - - /** - * @see org.apache.eve.event.ConnectListener# - * connectPerformed(org.apache.eve.event.ConnectEvent) - */ - public void inform( ConnectEvent an_event ) - { - ClientKey l_key = null ; - SocketChannel l_channel = null ; - - try - { - l_key = an_event.getClientKey() ; - l_channel = l_key.getSocket().getChannel() ; + while ( m_thread.isAlive() ) + { + Thread.sleep( 100 ) ; + } + } + } + + + // ------------------------------------------------------------------------ + // subscriber methods + // ------------------------------------------------------------------------ + + + /** + * @see org.apache.eve.event.ConnectListener# + * connectPerformed(org.apache.eve.event.ConnectEvent) + */ + public void inform( ConnectEvent an_event ) + { + ClientKey l_key = null ; + SocketChannel l_channel = null ; + + try + { + l_key = an_event.getClientKey() ; + l_channel = l_key.getSocket().getChannel() ; - // hands-off blocking sockets! - if ( null == l_channel ) - { - return ; - } + // hands-off blocking sockets! + if ( null == l_channel ) + { + return ; + } - l_channel.configureBlocking( false ) ; - l_channel.register( m_selector, SelectionKey.OP_READ, l_key ) ; - m_monitor.registeredChannel( l_key, m_selector ) ; - } - catch ( KeyExpiryException e ) - { - String l_msg = "Attempting session creation using expired key for " - + an_event.getClientKey() ; - m_monitor.keyExpiryFailure( l_key, e ) ; - } - catch ( IOException e ) - { - String l_msg = "Input managmer registration failure for " + - an_event.getClientKey() + " due to exception." ; - m_monitor.channelRegistrationFailure( m_selector, l_channel, - SelectionKey.OP_READ, e ) ; - } - } - - - /** - * @see org.apache.eve.event.DisconnectListener# - * inform(org.apache.eve.event.DisconnectEvent) - */ - public void inform( DisconnectEvent an_event ) - { - SelectionKey l_key = null ; - Iterator l_keys = m_selector.keys().iterator() ; + l_channel.configureBlocking( false ) ; + l_channel.register( m_selector, SelectionKey.OP_READ, l_key ) ; + m_monitor.registeredChannel( l_key, m_selector ) ; + } + catch ( KeyExpiryException e ) + { + String l_msg = "Attempting session creation using expired key for " + + an_event.getClientKey() ; + m_monitor.keyExpiryFailure( l_key, e ) ; + } + catch ( IOException e ) + { + String l_msg = "Input managmer registration failure for " + + an_event.getClientKey() + " due to exception." ; + m_monitor.channelRegistrationFailure( m_selector, l_channel, + SelectionKey.OP_READ, e ) ; + } + } + + + /** + * @see org.apache.eve.event.DisconnectListener# + * inform(org.apache.eve.event.DisconnectEvent) + */ + public void inform( DisconnectEvent an_event ) + { + SelectionKey l_key = null ; + Iterator l_keys = m_selector.keys().iterator() ; - while ( l_keys.hasNext() ) - { - l_key = ( SelectionKey ) l_keys.next() ; - if ( l_key.attachment().equals( an_event.getClientKey() ) ) - { - break ; - } - } - - if ( null == l_key ) - { - return ; - } + while ( l_keys.hasNext() ) + { + l_key = ( SelectionKey ) l_keys.next() ; + if ( l_key.attachment().equals( an_event.getClientKey() ) ) + { + break ; + } + } + + if ( null == l_key ) + { + return ; + } - try - { - l_key.channel().close() ; - } - catch ( IOException e ) - { - m_monitor.channelCloseFailure( - ( SocketChannel ) l_key.channel(), e ) ; - } + try + { + l_key.channel().close() ; + } + catch ( IOException e ) + { + m_monitor.channelCloseFailure( + ( SocketChannel ) l_key.channel(), e ) ; + } - l_key.cancel() ; - m_monitor.disconnectedClient( an_event.getClientKey() ) ; - } - - - /** - * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject) - */ - public void inform( EventObject an_event ) - { - Class l_clazz = an_event.getClass() ; - - if ( l_clazz.isAssignableFrom( ConnectEvent.class ) ) - { - inform( ( ConnectEvent ) an_event ) ; - } - else if ( l_clazz.isAssignableFrom( DisconnectEvent.class ) ) ; - { - inform( ( DisconnectEvent ) an_event ) ; - } - } - - - // ------------------------------------------------------------------------ - // private utilities - // ------------------------------------------------------------------------ - - - /** - * Processes input on channels of the read ready selected keys. - */ - void processInput() - { - /* - * Process the selectors that are ready. For each selector that - * is ready we read some data into a buffer we claim from a buffer - * pool. Next we create an InputEvent using the buffer and publish - * it using the event notifier/router. - */ - Iterator l_list = m_selector.selectedKeys().iterator() ; - while ( l_list.hasNext() ) - { - SelectionKey l_key = ( SelectionKey ) l_list.next() ; - ClientKey l_client = ( ClientKey ) l_key.attachment() ; + l_key.cancel() ; + m_monitor.disconnectedClient( an_event.getClientKey() ) ; + } + + + /** + * @see org.apache.eve.event.Subscriber#inform(java.util.EventObject) + */ + public void inform( EventObject an_event ) + { + Class l_clazz = an_event.getClass() ; + + if ( l_clazz.isAssignableFrom( ConnectEvent.class ) ) + { + inform( ( ConnectEvent ) an_event ) ; + } + else if ( l_clazz.isAssignableFrom( DisconnectEvent.class ) ) ; + { + inform( ( DisconnectEvent ) an_event ) ; + } + } + + + // ------------------------------------------------------------------------ + // private utilities + // ------------------------------------------------------------------------ + + + /** + * Processes input on channels of the read ready selected keys. + */ + void processInput() + { + /* + * Process the selectors that are ready. For each selector that + * is ready we read some data into a buffer we claim from a buffer + * pool. Next we create an InputEvent using the buffer and publish + * it using the event notifier/router. + */ + Iterator l_list = m_selector.selectedKeys().iterator() ; + while ( l_list.hasNext() ) + { + SelectionKey l_key = ( SelectionKey ) l_list.next() ; + ClientKey l_client = ( ClientKey ) l_key.attachment() ; - if ( l_key.isReadable() ) - { - ByteBuffer l_buf = null ; - SocketChannel l_channel = ( SocketChannel ) l_key.channel() ; - - // claim a buffer and read & return buffer on errors - try - { - l_buf = m_bp.getBuffer( this ) ; - l_channel.read( l_buf ) ; - } - catch ( ResourceException e ) - { - m_monitor.bufferUnavailable( m_bp, e ) ; - continue ; - } - catch ( IOException e ) - { - m_monitor.readFailed( l_client, e ) ; - m_bp.releaseClaim( l_buf, this ) ; - continue ; - } - - // report to monitor, create the event, and publish it - m_monitor.inputRecieved( l_client ) ; - InputEvent l_event = new ConcreteInputEvent( l_client, l_buf ) ; - m_router.publish( l_event ) ; - m_bp.releaseClaim( l_buf, this ) ; - } - } - } - - - /** - * A concrete InputEvent that uses the buffer pool to properly implement - * the interest claim and release methods. - * - * @author Alex Karasulu - * @author $Author$ - * @version $Revision$ - */ - class ConcreteInputEvent extends InputEvent - { - ConcreteInputEvent( ClientKey a_key, ByteBuffer a_buffer ) - { - super( a_key, a_buffer ) ; - } - - public ByteBuffer claimInterest( Object a_party ) - { - m_bp.claimInterest( m_buffer, a_party ) ; - return m_buffer.asReadOnlyBuffer() ; - } - - public void releaseInterest( Object a_party ) - { - m_bp.releaseClaim( m_buffer, a_party ) ; - } - } - - + if ( l_key.isReadable() ) + { + ByteBuffer l_buf = null ; + SocketChannel l_channel = ( SocketChannel ) l_key.channel() ; + + // claim a buffer and read & return buffer on errors + try + { + l_buf = m_bp.getBuffer( this ) ; + l_channel.read( l_buf ) ; + } + catch ( ResourceException e ) + { + m_monitor.bufferUnavailable( m_bp, e ) ; + continue ; + } + catch ( IOException e ) + { + m_monitor.readFailed( l_client, e ) ; + m_bp.releaseClaim( l_buf, this ) ; + continue ; + } + + // report to monitor, create the event, and publish it + m_monitor.inputRecieved( l_client ) ; + InputEvent l_event = new ConcreteInputEvent( l_client, l_buf ) ; + m_router.publish( l_event ) ; + m_bp.releaseClaim( l_buf, this ) ; + } + } + } + + + /** + * A concrete InputEvent that uses the buffer pool to properly implement + * the interest claim and release methods. + * + * @author Alex Karasulu + * @author $Author$ + * @version $Revision$ + */ + class ConcreteInputEvent extends InputEvent + { + ConcreteInputEvent( ClientKey a_key, ByteBuffer a_buffer ) + { + super( a_key, a_buffer ) ; + } + + public ByteBuffer claimInterest( Object a_party ) + { + m_bp.claimInterest( m_buffer, a_party ) ; + return m_buffer.asReadOnlyBuffer() ; + } + + public void releaseInterest( Object a_party ) + { + m_bp.releaseClaim( m_buffer, a_party ) ; + } + } + + /** * Gets the monitor associated with this InputManager. * Modified: incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/MerlinInputManager.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/MerlinInputManager.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/impl/src/java/org/apache/eve/input/MerlinInputManager.java Sat Dec 13 15:44:13 2003 @@ -1,7 +1,7 @@ /* ============================================================================ - The Apache Software License, Version 1.1 + The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. @@ -10,26 +10,26 @@ tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. + include the following acknowledgment: "This product includes software + developed by the Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowledgment may appear in the software itself, if + and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. + and "Apache Software Foundation" must not be used to endorse or promote + products derived from this software without prior written + permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. + "Apache" appear in their name, without prior written permission of the + Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND @@ -85,7 +85,7 @@ Initializable { /** the buffer pool to get buffers from */ - private BufferPool m_bp = null ; + private BufferPool m_bp = null ; /** event router used to decouple source to sink relationships */ private EventRouter m_router = null ; /** selector used to select a ready socket channel */ @@ -120,9 +120,9 @@ /** * */ - public void inform( EventObject an_event ) - { - } + public void inform( EventObject an_event ) + { + } // ------------------------------------------------------------------------ Modified: incubator/directory/ldap/trunk/eve/frontend/input/spi/project.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/spi/project.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/spi/project.xml Sat Dec 13 15:44:13 2003 @@ -8,16 +8,16 @@ org.apache.eve.event SNAPSHOT 2003 - + - Client input manager SPI used by Eve's frontend + Client input manager SPI used by Eve's frontend - Service interfaces for building an input manager that reads client + Service interfaces for building an input manager that reads client input from a socket channel. - + avalon-framework Modified: incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManager.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManager.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManager.java Sat Dec 13 15:44:13 2003 @@ -1,7 +1,7 @@ /* ============================================================================ - The Apache Software License, Version 1.1 + The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. @@ -10,26 +10,26 @@ tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. + include the following acknowledgment: "This product includes software + developed by the Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowledgment may appear in the software itself, if + and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. + and "Apache Software Foundation" must not be used to endorse or promote + products derived from this software without prior written + permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. + "Apache" appear in their name, without prior written permission of the + Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND Modified: incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -74,7 +74,7 @@ * * @param a_key the key of the client that was disconnected */ - void disconnectedClient( ClientKey a_key ) ; + void disconnectedClient( ClientKey a_key ) ; /** * Monitors channel registrations which occur on client sockets. @@ -82,7 +82,7 @@ * @param a_key the key of the client whose channel got registered * @param a_selector the selector used to register the client's channel */ - void registeredChannel( ClientKey a_key, Selector a_selector ) ; + void registeredChannel( ClientKey a_key, Selector a_selector ) ; /** * Monitors returns from the selector denoting a timeout or a wakeup due to @@ -100,9 +100,9 @@ void inputRecieved( ClientKey a_key ) ; - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ // failure monitoring methods - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ /** @@ -146,9 +146,9 @@ * @param a_fault the faulting exception */ void channelRegistrationFailure( Selector a_selector, - SocketChannel a_channel, - int a_selectionKey, - IOException a_fault ) ; + SocketChannel a_channel, + int a_selectionKey, + IOException a_fault ) ; /** * Monitors failures to close a client's socket channel. Modified: incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -160,7 +160,7 @@ * channelCloseFailure(java.nio.channels.SocketChannel, java.io.IOException) */ public void channelCloseFailure( SocketChannel a_channel, - IOException a_fault ) + IOException a_fault ) { } } Modified: incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/AvalonListenerManagerMonitor.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/AvalonListenerManagerMonitor.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/AvalonListenerManagerMonitor.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -65,7 +65,7 @@ * @version $Revision$ */ public class AvalonListenerManagerMonitor extends AbstractLogEnabled - implements ListenerManagerMonitor + implements ListenerManagerMonitor { /* (non-Javadoc) * @see org.apache.eve.listener.ListenerManagerMonitor#started() @@ -81,7 +81,7 @@ */ public void stopped() { - getLogger().info( "... stopped" ) ; + getLogger().info( "... stopped" ) ; } @@ -114,9 +114,9 @@ // may occur frequently so we do this right if ( getLogger().isInfoEnabled() ) { - StringBuffer l_buf = new StringBuffer( "accepted client " ) ; - l_buf.append( a_key.attachment() ) ; - getLogger().info( l_buf.toString() ) ; + StringBuffer l_buf = new StringBuffer( "accepted client " ) ; + l_buf.append( a_key.attachment() ) ; + getLogger().info( l_buf.toString() ) ; } } @@ -127,12 +127,12 @@ */ public void selectOccured( Selector a_selector ) { - // may occur very very frequently so we do this right + // may occur very very frequently so we do this right if ( getLogger().isDebugEnabled() ) { - StringBuffer l_buf = new StringBuffer( "select on " ) ; - l_buf.append( a_selector ) ; - getLogger().debug( l_buf.toString() ) ; + StringBuffer l_buf = new StringBuffer( "select on " ) ; + l_buf.append( a_selector ) ; + getLogger().debug( l_buf.toString() ) ; } } @@ -153,10 +153,10 @@ * org.apache.eve.listener.ServerListener, java.io.IOException) */ public void failedToUnbind( ServerListener a_listener, - IOException a_failure ) + IOException a_failure ) { getLogger().error( "failed to unbind listener from " + a_listener - + " encountered exception: " + a_failure.getMessage() ) ; + + " encountered exception: " + a_failure.getMessage() ) ; } Modified: incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/DefaultListenerManager.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/DefaultListenerManager.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/DefaultListenerManager.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -79,7 +79,7 @@ */ public class DefaultListenerManager implements - DisconnectSubscriber, + DisconnectSubscriber, ListenerManager, Runnable { @@ -90,54 +90,54 @@ /** the client keys for accepted connections */ private final Set m_clients ; - /** the thread driving this Runnable */ - private Thread m_thread = null ; - /** parameter used to politely stop running thread */ - private Boolean m_hasStarted = null ; - /** the listner manager's monitor */ - private ListenerManagerMonitor m_monitor = - new ListenerManagerMonitorAdapter() ; + /** the thread driving this Runnable */ + private Thread m_thread = null ; + /** parameter used to politely stop running thread */ + private Boolean m_hasStarted = null ; + /** the listner manager's monitor */ + private ListenerManagerMonitor m_monitor = + new ListenerManagerMonitorAdapter() ; - /** - * Creates a default listener manager using an event router. - * - * @param a_router the router to publish events to - * @throws IOException - */ + /** + * Creates a default listener manager using an event router. + * + * @param a_router the router to publish events to + * @throws IOException + */ public DefaultListenerManager( EventRouter a_router ) throws IOException { - m_router = a_router ; - m_clients = new HashSet() ; - m_selector = Selector.open() ; - m_hasStarted = new Boolean( false ) ; - m_router.subscribe( DisconnectEvent.class, null, this ) ; + m_router = a_router ; + m_clients = new HashSet() ; + m_selector = Selector.open() ; + m_hasStarted = new Boolean( false ) ; + m_router.subscribe( DisconnectEvent.class, null, this ) ; } - /** - * Gets the monitor. - * - * @return Returns the monitor. - */ - public ListenerManagerMonitor getMonitor() - { - return m_monitor ; - } + /** + * Gets the monitor. + * + * @return Returns the monitor. + */ + public ListenerManagerMonitor getMonitor() + { + return m_monitor ; + } - /** - * Sets the monitor. - * - * @param a_monitor The monitor to set. - */ - public void setMonitor( ListenerManagerMonitor a_monitor ) - { - m_monitor = a_monitor ; - } + /** + * Sets the monitor. + * + * @param a_monitor The monitor to set. + */ + public void setMonitor( ListenerManagerMonitor a_monitor ) + { + m_monitor = a_monitor ; + } - /** + /** * @see org.apache.eve.listener.ListenerManager#register(org.apache.eve. * listener.ServerListener) */ @@ -145,14 +145,14 @@ { try { - ServerSocketChannel l_channel = ServerSocketChannel.open() ; - InetSocketAddress l_address = new InetSocketAddress( - a_listener.getAddress(), - a_listener.getPort() ) ; - l_channel.socket().bind( l_address, a_listener.getBacklog() ) ; - l_channel.configureBlocking( false ) ; - l_channel.register( m_selector, SelectionKey.OP_ACCEPT, - a_listener ) ; + ServerSocketChannel l_channel = ServerSocketChannel.open() ; + InetSocketAddress l_address = new InetSocketAddress( + a_listener.getAddress(), + a_listener.getPort() ) ; + l_channel.socket().bind( l_address, a_listener.getBacklog() ) ; + l_channel.configureBlocking( false ) ; + l_channel.register( m_selector, SelectionKey.OP_ACCEPT, + a_listener ) ; } catch ( IOException e ) { Modified: incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/ListenerManagerMonitorAdapter.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/ListenerManagerMonitorAdapter.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/ListenerManagerMonitorAdapter.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -64,24 +64,24 @@ */ public class ListenerManagerMonitorAdapter implements ListenerManagerMonitor { - /* - * (non-Javadoc) - * @see org.apache.eve.listener.ListenerManagerMonitor#started() - */ - public void started() - { - } - - - /* - * (non-Javadoc) - * @see org.apache.eve.listener.ListenerManagerMonitor#stopped() - */ - public void stopped() - { - } + /* + * (non-Javadoc) + * @see org.apache.eve.listener.ListenerManagerMonitor#started() + */ + public void started() + { + } + + + /* + * (non-Javadoc) + * @see org.apache.eve.listener.ListenerManagerMonitor#stopped() + */ + public void stopped() + { + } - + /* (non-Javadoc) * @see org.apache.eve.listener.ListenerManagerMonitor#bindOccured( * org.apache.eve.listener.ServerListener) @@ -100,43 +100,43 @@ } - /* - * (non-Javadoc) - * @see org.apache.eve.listener.ListenerManagerMonitor#acceptOccured( - * java.nio.channels.SelectionKey) - */ - public void acceptOccured( SelectionKey a_key ) - { - } - - - /* - * (non-Javadoc) - * @see org.apache.eve.listener.ListenerManagerMonitor#selectOccured( - * java.nio.channels.Selector) - */ - public void selectOccured( Selector a_selector ) - { - } - - - /* (non-Javadoc) - * @see org.apache.eve.listener.ListenerManagerMonitor#failedToBind( - * org.apache.eve.listener.ServerListener, java.io.IOException) - */ - public void failedToBind( ServerListener a_listener, IOException a_failure ) - { - } - - - /* (non-Javadoc) - * @see org.apache.eve.listener.ListenerManagerMonitor#failedToUnbind( - * org.apache.eve.listener.ServerListener, java.io.IOException) - */ - public void failedToUnbind( ServerListener a_listener, - IOException a_failure ) - { - } + /* + * (non-Javadoc) + * @see org.apache.eve.listener.ListenerManagerMonitor#acceptOccured( + * java.nio.channels.SelectionKey) + */ + public void acceptOccured( SelectionKey a_key ) + { + } + + + /* + * (non-Javadoc) + * @see org.apache.eve.listener.ListenerManagerMonitor#selectOccured( + * java.nio.channels.Selector) + */ + public void selectOccured( Selector a_selector ) + { + } + + + /* (non-Javadoc) + * @see org.apache.eve.listener.ListenerManagerMonitor#failedToBind( + * org.apache.eve.listener.ServerListener, java.io.IOException) + */ + public void failedToBind( ServerListener a_listener, IOException a_failure ) + { + } + + + /* (non-Javadoc) + * @see org.apache.eve.listener.ListenerManagerMonitor#failedToUnbind( + * org.apache.eve.listener.ServerListener, java.io.IOException) + */ + public void failedToUnbind( ServerListener a_listener, + IOException a_failure ) + { + } /* (non-Javadoc) Modified: incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/MerlinListenerManager.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/MerlinListenerManager.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/listener/impl/src/java/org/apache/eve/listener/MerlinListenerManager.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -77,9 +77,9 @@ */ public class MerlinListenerManager extends AbstractLogEnabled implements - ListenerManager, + ListenerManager, Initializable, - Serviceable, + Serviceable, Startable { /** the listener manager implementation wrapped by this service */ @@ -88,9 +88,9 @@ private EventRouter m_router ; - // ------------------------------------------------------------------------ - // ListenerManager delegating methods ... - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ + // ListenerManager delegating methods ... + // ------------------------------------------------------------------------ /** @@ -130,7 +130,7 @@ */ public void inform( EventObject an_event ) { - m_manager.inform( an_event ) ; + m_manager.inform( an_event ) ; } @@ -168,9 +168,9 @@ * org.apache.avalon.framework.service.ServiceManager) */ public void service( ServiceManager a_manager ) - throws ServiceException + throws ServiceException { - m_router = ( EventRouter ) a_manager.lookup( "event-router" ) ; + m_router = ( EventRouter ) a_manager.lookup( "event-router" ) ; } @@ -179,6 +179,6 @@ */ public void initialize() throws Exception { - m_manager = new DefaultListenerManager( m_router ) ; + m_manager = new DefaultListenerManager( m_router ) ; } } Modified: incubator/directory/ldap/trunk/eve/frontend/listener/spi/project.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/listener/spi/project.xml (original) +++ incubator/directory/ldap/trunk/eve/frontend/listener/spi/project.xml Sat Dec 13 15:44:13 2003 @@ -8,18 +8,18 @@ org.apache.eve.event SNAPSHOT 2003 - + - Socket listener SPI used by Eve's frontend + Socket listener SPI used by Eve's frontend - Eve's Listener manager interface is responsible for adding and - removing listeners that bind to ports on server interfaces to - accept incoming client connections. The interface exposes methods - to dynamically bind and unbind these server sockets. + Eve's Listener manager interface is responsible for adding and + removing listeners that bind to ports on server interfaces to + accept incoming client connections. The interface exposes methods + to dynamically bind and unbind these server sockets. - + avalon-framework @@ -28,7 +28,7 @@ http://avalon.apache.org/framework - + directory eve-frontend-common-api SNAPSHOT Modified: incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManager.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManager.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManager.java Sat Dec 13 15:44:13 2003 @@ -1,7 +1,7 @@ /* ============================================================================ - The Apache Software License, Version 1.1 + The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. @@ -10,26 +10,26 @@ tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. + include the following acknowledgment: "This product includes software + developed by the Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowledgment may appear in the software itself, if + and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. + and "Apache Software Foundation" must not be used to endorse or promote + products derived from this software without prior written + permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. + "Apache" appear in their name, without prior written permission of the + Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND Modified: incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManagerMonitor.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManagerMonitor.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ListenerManagerMonitor.java Sat Dec 13 15:44:13 2003 @@ -23,7 +23,7 @@ and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote + and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -67,14 +67,14 @@ /** * Monitors when the ListnenerManager starts. */ - void started() ; - - /** - * Monitors when the ListnenerManager stops. - */ - void stopped() ; + void started() ; + + /** + * Monitors when the ListnenerManager stops. + */ + void stopped() ; - /** + /** * Monitors bind occurences. * * @param a_listener the listener just bound to a port @@ -93,30 +93,30 @@ * * @param a_key */ - void acceptOccured( SelectionKey a_key ) ; - - /** - * Monitors the occurrence of successful select calls on a selector - * - * @param a_selector - */ - void selectOccured( Selector a_selector ) ; - - /** - * Monitors bind failures. - * - * @param a_listener the listener whose bind attempt failed - * @param a_failure the exception resulting from the failure - */ - void failedToBind( ServerListener a_listener, IOException a_failure ) ; - - /** - * Monitors unbind failures. - * - * @param a_listener the listener whose unbind attempt failed - * @param a_failure the exception resulting from the failure - */ - void failedToUnbind( ServerListener a_listener, IOException a_failure ) ; + void acceptOccured( SelectionKey a_key ) ; + + /** + * Monitors the occurrence of successful select calls on a selector + * + * @param a_selector + */ + void selectOccured( Selector a_selector ) ; + + /** + * Monitors bind failures. + * + * @param a_listener the listener whose bind attempt failed + * @param a_failure the exception resulting from the failure + */ + void failedToBind( ServerListener a_listener, IOException a_failure ) ; + + /** + * Monitors unbind failures. + * + * @param a_listener the listener whose unbind attempt failed + * @param a_failure the exception resulting from the failure + */ + void failedToUnbind( ServerListener a_listener, IOException a_failure ) ; /** * Monitors expiration failures on client keys. @@ -140,5 +140,5 @@ * @param a_selector the selector on which the select failed * @param a_failure the exception resulting from the failure */ - void failedToSelect( Selector a_selector, IOException a_failure ) ; + void failedToSelect( Selector a_selector, IOException a_failure ) ; } Modified: incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ServerListener.java ============================================================================== --- incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ServerListener.java (original) +++ incubator/directory/ldap/trunk/eve/frontend/listener/spi/src/java/org/apache/eve/listener/ServerListener.java Sat Dec 13 15:44:13 2003 @@ -1,7 +1,7 @@ /* ============================================================================ - The Apache Software License, Version 1.1 + The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. @@ -10,26 +10,26 @@ tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. + include the following acknowledgment: "This product includes software + developed by the Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowledgment may appear in the software itself, if + and wherever such third-party acknowledgments normally appear. 4. The names "Eve Directory Server", "Apache Directory Project", "Apache Eve" - and "Apache Software Foundation" must not be used to endorse or promote - products derived from this software without prior written - permission. For written permission, please contact apache@apache.org. + and "Apache Software Foundation" must not be used to endorse or promote + products derived from this software without prior written + permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. + "Apache" appear in their name, without prior written permission of the + Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND Modified: incubator/directory/ldap/trunk/eve/maven.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/maven.xml (original) +++ incubator/directory/ldap/trunk/eve/maven.xml Sat Dec 13 15:44:13 2003 @@ -23,60 +23,60 @@ - - + + - + - - + name="java:compile" + description="Build All Jar Files And Intall"> + + - - + name="clean-all" + description="Clean all sandbox projects"> + + - - + name="eclipse-all" + description="Generate eclipse descriptors for all projects"> + + - - + name="eclipse-all" + description="Create all eclipse projects"> + + Modified: incubator/directory/ldap/trunk/eve/project.xml ============================================================================== --- incubator/directory/ldap/trunk/eve/project.xml (original) +++ incubator/directory/ldap/trunk/eve/project.xml Sat Dec 13 15:44:13 2003 @@ -16,13 +16,13 @@ scm:cvs:pserver:anonymous@cvs.sourceforge.net:/cvsroot/ldapd:sandbox1 http://cvs.apache.org/viewcvs.cgi/incubator/directory/ldap/trunk/eve/?root=Apache-SVN - scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/ldapd:sandbox1 + scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/ldapd:sandbox1 http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ldapd/sandbox1/ - + - Eve Directory Server - + Eve Directory Server + Eve is an embeddable LDAP version 3 directory server based on a SEDA architecture with support for several IoC containers, including Avalon's Merlin, Pheonix, Loom, PicoContainer and @@ -30,7 +30,7 @@ several backends and provider options. Eve introduces for the first time the concept of stored procedures and triggers into an industrial grade LDAP server. - + @@ -52,7 +52,7 @@ akarasulu at apache.org PM - Chair + Chair Founder Developer Architect @@ -113,7 +113,7 @@ 3.8.1 http://junit.org - + directory-dev@incubator.apache.org @@ -127,7 +127,7 @@ **/*Test* **/*TestCase* - + @@ -160,7 +160,7 @@ - + ${basedir}/src/java **/*.dtd @@ -168,7 +168,7 @@ **/*.x* - + ${basedir}/conf BLOCK-INF