directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 9681 - in incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl: . conf src/java/org/apache/eve src/test src/test/org src/test/org/apache src/test/org/apache/eve
Date Mon, 22 Mar 2004 10:43:55 GMT
Author: akarasulu
Date: Mon Mar 22 02:43:55 2004
New Revision: 9681

Added:
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/test/
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/test/org/
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/test/org/apache/
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/test/org/apache/eve/
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/test/org/apache/eve/MerlinFrontendTest.java
Modified:
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/conf/block.xml
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/project.xml
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/java/org/apache/eve/MerlinFrontend.java
Log:
added test case and deps in project.xml and block.xml and filled it all in

Modified: incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/conf/block.xml
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/conf/block.xml	(original)
+++ incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/conf/block.xml	Mon Mar
22 02:43:55 2004
@@ -29,43 +29,72 @@
           id="avalon-framework:avalon-framework-impl" version="4.1.5"/>
 
         <resource 
-          id="directory:eve-frontend-common-api" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-common-api" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-spi" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-spi" version="SNAPSHOT"/>
 
         <resource 
-          id="directory:eve-frontend-event-spi" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-event-spi" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-event-pojo-impl" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-event-pojo-impl" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-event-merlin-impl" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-event-merlin-impl" version="SNAPSHOT"/>
 
         <resource 
-          id="directory:eve-frontend-buffer-spi" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-buffer-spi" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-buffer-pojo-impl" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-buffer-pojo-impl" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-buffer-merlin-impl" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-buffer-merlin-impl" version="SNAPSHOT"/>
 
         <resource 
-          id="directory:eve-frontend-listener-spi" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-listener-spi" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-listener-pojo-impl" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-listener-pojo-impl" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-listener-merlin-impl" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-listener-merlin-impl" version="SNAPSHOT"/>
 
         <resource 
-          id="directory:eve-frontend-input-spi" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-input-spi" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-input-pojo-impl" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-input-pojo-impl" version="SNAPSHOT"/>
         <resource 
-          id="directory:eve-frontend-input-merlin-impl" version="SNAPSHOT"/>
+          id="incubator-directory:eve-frontend-input-merlin-impl" version="SNAPSHOT"/>
+
+        <resource 
+          id="incubator-directory:eve-frontend-output-spi" version="SNAPSHOT"/>
+        <resource 
+          id="incubator-directory:eve-frontend-output-pojo-impl" version="SNAPSHOT"/>
+        <resource 
+          id="incubator-directory:eve-frontend-output-merlin-impl" version="SNAPSHOT"/>
+
+        <resource 
+          id="incubator-directory:eve-frontend-encoder-spi" version="SNAPSHOT"/>
+        <resource 
+          id="incubator-directory:eve-frontend-encoder-pojo-impl" version="SNAPSHOT"/>
+        <resource 
+          id="incubator-directory:eve-frontend-encoder-merlin-impl" version="SNAPSHOT"/>
+
+        <resource 
+          id="incubator-directory:eve-frontend-decoder-spi" version="SNAPSHOT"/>
+        <resource 
+          id="incubator-directory:eve-frontend-decoder-pojo-impl" version="SNAPSHOT"/>
+        <resource 
+          id="incubator-directory:eve-frontend-decoder-merlin-impl" version="SNAPSHOT"/>
+
+        <resource 
+          id="incubator-directory:eve-frontend-processor-spi" version="SNAPSHOT"/>
+        <resource 
+          id="incubator-directory:eve-frontend-processor-pojo-impl" version="SNAPSHOT"/>
+        <resource 
+          id="incubator-directory:eve-frontend-processor-merlin-impl" version="SNAPSHOT"/>
       </repository>
     </classpath>
   </classloader>
 
    <component name="thread-manager" 
       class="org.apache.avalon.cornerstone.blocks.threads.DefaultThreadManager">
+      
      <configuration>
        <thread-group>
          <name>default</name>
@@ -75,7 +104,44 @@
          <min-threads>2</min-threads>
          <min-spare-threads>1</min-spare-threads>
        </thread-group>
+
+       <thread-group>
+         <name>decoder-manager</name>
+         <priority>5</priority> 
+         <is-daemon>false</is-daemon>
+         <max-threads>5</max-threads>
+         <min-threads>2</min-threads>
+         <min-spare-threads>1</min-spare-threads>
+       </thread-group>
+
+       <thread-group>
+         <name>request-processor</name>
+         <priority>5</priority> 
+         <is-daemon>false</is-daemon>
+         <max-threads>5</max-threads>
+         <min-threads>2</min-threads>
+         <min-spare-threads>1</min-spare-threads>
+       </thread-group>
+
+       <thread-group>
+         <name>encoder-manager</name>
+         <priority>5</priority> 
+         <is-daemon>false</is-daemon>
+         <max-threads>5</max-threads>
+         <min-threads>2</min-threads>
+         <min-spare-threads>1</min-spare-threads>
+       </thread-group>
+
+       <thread-group>
+         <name>output-manager</name>
+         <priority>5</priority> 
+         <is-daemon>false</is-daemon>
+         <max-threads>5</max-threads>
+         <min-threads>2</min-threads>
+         <min-spare-threads>1</min-spare-threads>
+       </thread-group>
      </configuration>
+     
    </component>
 
   <component
@@ -93,6 +159,22 @@
   <component
     name="input-manager" 
     class="org.apache.eve.input.MerlinInputManager"/>
+
+  <component
+    name="output-manager" 
+    class="org.apache.eve.output.impl.MerlinOutputManager"/>
+
+  <component
+    name="encoder-manager" 
+    class="org.apache.eve.encoder.impl.MerlinEncoderManager"/>
+
+  <component
+    name="decoder-manager" 
+    class="org.apache.eve.decoder.impl.MerlinDecoderManager"/>
+
+  <component
+    name="request-processor" 
+    class="org.apache.eve.processor.impl.MerlinRequestProcessor"/>
 
   <component
     name="frontend"

Modified: incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/project.xml
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/project.xml	(original)
+++ incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/project.xml	Mon Mar 22
02:43:55 2004
@@ -23,6 +23,33 @@
       <!-- cornerstone dependencies -->
       
       <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>3.8.1</version>
+        <url>http://junit.org</url>
+      </dependency>
+
+      <!-- Avalon Dependencies -->
+      
+      <dependency>
+        <groupId>merlin</groupId>
+        <artifactId>merlin-unit</artifactId>
+        <version>3.2.10</version>
+      </dependency>
+      
+      <!-- for some reason this is needed for merlin-unit tests     -->
+      <!-- but it is not needed when when using command line merlin -->
+      <!-- within the block.xml's classloader directive             -->
+      
+      <dependency>
+        <groupId>logkit</groupId>
+        <artifactId>logkit</artifactId>
+        <version>1.2.2</version>
+      </dependency>
+      
+      <!-- cornerstone dependencies -->
+      
+      <dependency>
         <groupId>cornerstone-threads</groupId>
         <artifactId>cornerstone-threads-api</artifactId>
         <version>SNAPSHOT</version>
@@ -87,10 +114,55 @@
         <url>http://jakarta.apache.org/commons/collections</url>
       </dependency>
 
+      <dependency>
+        <id>commons-lang</id>
+        <version>2.0</version>
+        <url>http://jakarta.apache.org/commons/lang</url>
+      </dependency>
+
+      <dependency>
+        <id>commons-logging</id>
+        <version>1.0.3</version>
+        <url>http://jakarta.apache.org/commons/logging</url>
+      </dependency>
+
+      <dependency>
+        <id>commons-codec</id>
+        <version>1.2</version>
+        <url>http://jakarta.apache.org/commons/codec</url>
+      </dependency>
+
+      <dependency>
+        <id>commons-primitives</id>
+        <version>1.1-dev</version>
+        <url>http://jakarta.apache.org/commons/primitives</url>
+      </dependency>
+
       <!-- directory dependencies -->
 
       <dependency>
         <groupId>incubator-directory</groupId>
+        <artifactId>ldap-common</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>ldap-snacc-provider</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>codec-stateful</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
         <artifactId>eve-frontend-common-api</artifactId>
         <version>SNAPSHOT</version>
         <url>http://directory.apache.org</url>
@@ -188,10 +260,87 @@
       </dependency>
 
       <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>3.8.1</version>
-        <url>http://junit.org</url>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-output-spi</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-output-pojo-impl</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-output-merlin-impl</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+      
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-encoder-spi</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-encoder-pojo-impl</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-encoder-merlin-impl</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+      
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-decoder-spi</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-decoder-pojo-impl</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-decoder-merlin-impl</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+      
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-processor-spi</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-processor-pojo-impl</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
+      </dependency>
+
+      <dependency>
+        <groupId>incubator-directory</groupId>
+        <artifactId>eve-frontend-processor-merlin-impl</artifactId>
+        <version>SNAPSHOT</version>
+        <url>http://directory.apache.org</url>
       </dependency>
     </dependencies>
 </project>

Modified: incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/java/org/apache/eve/MerlinFrontend.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/java/org/apache/eve/MerlinFrontend.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/java/org/apache/eve/MerlinFrontend.java
Mon Mar 22 02:43:55 2004
@@ -17,15 +17,20 @@
 package org.apache.eve ;
 
 
-import org.apache.avalon.cornerstone.services.threads.ThreadManager ;
 import org.apache.avalon.framework.service.Serviceable ;
 import org.apache.avalon.framework.service.ServiceManager ;
 import org.apache.avalon.framework.service.ServiceException ;
 
+import org.apache.avalon.cornerstone.services.threads.ThreadManager ;
+
 import org.apache.eve.event.EventRouter ;
 import org.apache.eve.buffer.BufferPool ;
 import org.apache.eve.input.InputManager ;
+import org.apache.eve.output.OutputManager ;
+import org.apache.eve.decoder.DecoderManager ;
+import org.apache.eve.encoder.EncoderManager ;
 import org.apache.eve.listener.ListenerManager ;
+import org.apache.eve.processor.RequestProcessor ;
 
 
 /**
@@ -46,10 +51,14 @@
     Serviceable
 {
     BufferPool m_bufferPool = null ;
-    ThreadManager m_threadManager = null ;
     EventRouter m_eventRouter = null ;
-    ListenerManager m_listenerManager = null ;
     InputManager m_inputManager = null ;
+    OutputManager m_outputManager = null ;
+    ThreadManager m_threadManager = null ;
+    EncoderManager m_encoderManager = null ;
+    DecoderManager m_decoderManager = null ;
+    ListenerManager m_listenerManager = null ;
+    RequestProcessor m_requestProcessor = null ;
     
     
     // ------------------------------------------------------------------------
@@ -68,6 +77,14 @@
      *      key="listener-manager" version="1.0" 
      * @avalon.dependency type="org.apache.eve.input.InputManager"
      *      key="input-manager" version="1.0"
+     * @avalon.dependency type="org.apache.eve.output.OutputManager"
+     *      key="output-manager" version="1.0"
+     * @avalon.dependency type="org.apache.eve.decoder.DecoderManager"
+     *      key="decoder-manager" version="1.0"
+     * @avalon.dependency type="org.apache.eve.encoder.EncoderManager"
+     *      key="encoder-manager" version="1.0"
+     * @avalon.dependency type="org.apache.eve.processor.RequestProcessor"
+     *      key="request-processor" version="1.0"
      * 
      * @see org.apache.avalon.framework.service.Serviceable#service(
      * org.apache.avalon.framework.service.ServiceManager)
@@ -88,5 +105,17 @@
 
         m_inputManager = ( InputManager ) a_manager
             .lookup( "input-manager" ) ;
+        
+        m_outputManager = ( OutputManager ) a_manager
+            .lookup( "output-manager" ) ;
+
+        m_decoderManager = ( DecoderManager ) a_manager
+            .lookup( "decoder-manager" ) ;
+
+        m_encoderManager = ( EncoderManager ) a_manager
+            .lookup( "encoder-manager" ) ;
+
+        m_requestProcessor = ( RequestProcessor ) a_manager
+            .lookup( "request-processor" ) ;
     }
 }

Added: incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/test/org/apache/eve/MerlinFrontendTest.java
==============================================================================
--- (empty file)
+++ incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/src/test/org/apache/eve/MerlinFrontendTest.java
Mon Mar 22 02:43:55 2004
@@ -0,0 +1,119 @@
+/*
+ *   Copyright 2004 The Apache Software Foundation
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ */
+package org.apache.eve ;
+
+
+import org.apache.avalon.cornerstone.services.threads.ThreadManager;
+import org.apache.avalon.merlin.unit.AbstractMerlinTestCase ;
+import org.apache.eve.buffer.BufferPool;
+import org.apache.eve.decoder.DecoderManager;
+import org.apache.eve.encoder.EncoderManager;
+import org.apache.eve.event.EventRouter;
+import org.apache.eve.input.InputManager;
+import org.apache.eve.listener.ListenerManager;
+import org.apache.eve.output.OutputManager;
+import org.apache.eve.processor.RequestProcessor;
+
+
+/**
+ * Tests the Merlin based frontend.
+ *
+ * @author <a href="mailto:directory-dev@incubator.apache.org">
+ * Apache Directory Project</a>
+ * @version $Rev$
+ */
+public class MerlinFrontendTest extends AbstractMerlinTestCase
+{
+    private BufferPool bufferPool = null ;
+    private EventRouter eventRouter = null ;
+    private InputManager inputManager = null ;
+    private OutputManager outputManager = null ;
+    private ThreadManager threadManager = null ;
+    private EncoderManager encoderManager = null ;
+    private DecoderManager decoderManager = null ;
+    private ListenerManager listenerManager = null ;
+    private RequestProcessor requestProcessor = null ;
+    
+    /**
+     * Creates a frontendt test case.
+     * 
+     * @param name
+     */
+    public MerlinFrontendTest( String name )
+    {
+        super( name ) ;
+    }
+    
+
+    /*
+     * @see AbstractMerlinTestCase#setUp()
+     */
+    public void setUp() throws Exception
+    {
+        super.setUp() ;
+
+        bufferPool = ( BufferPool ) 
+            resolve( "/eve/buffer-pool" ) ;
+        
+        eventRouter = ( EventRouter )
+            resolve( "/eve/event-router" ) ; 
+        
+        inputManager = ( InputManager ) 
+            resolve( "/eve/input-manager" ) ;
+
+        outputManager = ( OutputManager ) 
+            resolve( "/eve/output-manager" ) ;
+
+        threadManager = ( ThreadManager ) 
+            resolve( "/eve/thread-manager" ) ;
+
+        encoderManager = ( EncoderManager ) 
+            resolve( "/eve/encoder-manager" ) ;
+
+        decoderManager = ( DecoderManager ) 
+            resolve( "/eve/decoder-manager" ) ;
+
+        listenerManager = ( ListenerManager ) 
+            resolve( "/eve/listener-manager" ) ;
+
+        requestProcessor = ( RequestProcessor ) 
+            resolve( "/eve/request-processor" ) ;
+    }
+
+    
+    /*
+     * @see AbstractMerlinTestCase#tearDown()
+     */
+    public void tearDown()
+    {
+        super.tearDown() ;
+    }
+    
+    
+    public void testPlacebo()
+    {
+        assertNotNull( this.bufferPool ) ;
+        assertNotNull( this.decoderManager ) ;
+        assertNotNull( this.encoderManager ) ;
+        assertNotNull( this.eventRouter ) ;
+        assertNotNull( this.inputManager ) ;
+        assertNotNull( this.listenerManager ) ;
+        assertNotNull( this.outputManager ) ;
+        assertNotNull( this.requestProcessor ) ;
+        assertNotNull( this.threadManager ) ;
+    }
+}

Mime
View raw message