directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 6704 - in incubator/directory/eve/trunk/eve/frontend: frontend/merlin-impl frontend/merlin-impl/conf input/merlin-impl/src/java/org/apache/eve/input input/pojo-impl/src/java/org/apache/eve/input input/spi/src/java/org/apache/eve/input
Date Tue, 17 Feb 2004 07:17:05 GMT
Author: akarasulu
Date: Mon Feb 16 23:17:04 2004
New Revision: 6704

Modified:
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/conf/config.xml
   incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/project.xml
   incubator/directory/eve/trunk/eve/frontend/input/merlin-impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java
   incubator/directory/eve/trunk/eve/frontend/input/merlin-impl/src/java/org/apache/eve/input/MerlinInputManager.java
   incubator/directory/eve/trunk/eve/frontend/input/pojo-impl/src/java/org/apache/eve/input/DefaultInputManager.java
   incubator/directory/eve/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java
   incubator/directory/eve/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java
Log:
don't know what this is for

Modified: incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/conf/config.xml
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/conf/config.xml	(original)
+++ incubator/directory/eve/trunk/eve/frontend/frontend/merlin-impl/conf/config.xml	Mon Feb
16 23:17:04 2004
@@ -4,4 +4,19 @@
   <target path="/eve/frontend">
     <categories priority="DEBUG"/>
   </target>
+  <target path="/eve/event-router">
+    <categories priority="DEBUG"/>
+  </target>
+  <target path="/eve/buffer-pool">
+    <categories priority="DEBUG"/>
+  </target>
+  <target path="/eve/listener-manager">
+    <categories priority="DEBUG"/>
+  </target>
+  <target path="/eve/input-manager">
+    <categories priority="DEBUG"/>
+  </target>
+  <target path="/eve/thread-manager">
+    <categories priority="DEBUG"/>
+  </target>
 </targets>

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 Feb 16
23:17:04 2004
@@ -166,7 +166,6 @@
         <url>http://directory.apache.org</url>
       </dependency>
 
-      <!-- 
       <dependency>
         <groupId>directory</groupId>
         <artifactId>eve-frontend-input-spi</artifactId>
@@ -187,8 +186,6 @@
         <version>SNAPSHOT</version>
         <url>http://directory.apache.org</url>
       </dependency>
-
-      -->
 
       <dependency>
         <groupId>junit</groupId>

Modified: incubator/directory/eve/trunk/eve/frontend/input/merlin-impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/input/merlin-impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/input/merlin-impl/src/java/org/apache/eve/input/AvalonInputManagerMonitor.java
Mon Feb 16 23:17:04 2004
@@ -18,6 +18,7 @@
 
 
 import java.io.IOException ;
+import java.nio.ByteBuffer ;
 import java.nio.channels.Selector ;
 import java.nio.channels.SocketChannel ;
 
@@ -209,5 +210,25 @@
         {
             getLogger().warn( "Select on " + a_selector + " timed out" ) ;
         }
+    }
+    
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#inputRecieved(
+     * java.nio.Buffer, org.apache.eve.listener.ClientKey)
+     */
+    public void inputRecieved( ByteBuffer a_buffer, ClientKey a_key )
+    {
+        if ( getLogger().isDebugEnabled() )
+        {
+            getLogger().debug( "Recieved input [" +  toHexString( a_buffer ) 
+                    + "] from client " + a_key ) ;
+        }
+    }
+    
+    
+    public String toHexString( ByteBuffer a_buf )
+    {
+        return new String ( a_buf.array() ) ;
     }
 }

Modified: incubator/directory/eve/trunk/eve/frontend/input/merlin-impl/src/java/org/apache/eve/input/MerlinInputManager.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/input/merlin-impl/src/java/org/apache/eve/input/MerlinInputManager.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/input/merlin-impl/src/java/org/apache/eve/input/MerlinInputManager.java
Mon Feb 16 23:17:04 2004
@@ -27,6 +27,7 @@
 import org.apache.avalon.framework.service.ServiceManager ;
 import org.apache.avalon.framework.service.ServiceException ;
 import org.apache.avalon.framework.logger.AbstractLogEnabled ;
+import org.apache.avalon.framework.logger.Logger;
 import org.apache.avalon.cornerstone.services.threads.ThreadManager ;
 
 import org.apache.eve.buffer.BufferPool ;
@@ -62,6 +63,8 @@
     private Selector m_selector = null ;
     /** the wrapped input manager implementation */
     private DefaultInputManager m_delegate = null ;
+    /** the monitor for the delegate */
+    private AvalonInputManagerMonitor m_monitor = null ;
     
     
     // ------------------------------------------------------------------------
@@ -103,6 +106,13 @@
     // ------------------------------------------------------------------------
     
     
+    public void enableLogging( Logger a_logger )
+    {
+        super.enableLogging( a_logger ) ;
+        m_monitor = new AvalonInputManagerMonitor() ;
+        m_monitor.enableLogging( a_logger ) ;
+    }
+    
     /**
      * Starts up this module.
      * 
@@ -143,6 +153,7 @@
     {
         getLogger().debug( "Delegate constructed" ) ;
         m_delegate = new DefaultInputManager( m_router, m_bp ) ;
+        m_delegate.setMonitor( m_monitor ) ;
     }
 
     

Modified: incubator/directory/eve/trunk/eve/frontend/input/pojo-impl/src/java/org/apache/eve/input/DefaultInputManager.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/input/pojo-impl/src/java/org/apache/eve/input/DefaultInputManager.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/input/pojo-impl/src/java/org/apache/eve/input/DefaultInputManager.java
Mon Feb 16 23:17:04 2004
@@ -294,6 +294,8 @@
                 {
                     l_buf = m_bp.getBuffer( this ) ;
                     l_channel.read( l_buf ) ;
+                    m_monitor.inputRecieved( 
+                            l_buf.asReadOnlyBuffer(), l_client ) ;
                     l_list.remove() ;
                 }
                 catch ( ResourceException e )

Modified: incubator/directory/eve/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitor.java
Mon Feb 16 23:17:04 2004
@@ -51,6 +51,8 @@
 
 
 import java.io.IOException ;
+
+import java.nio.ByteBuffer ;
 import java.nio.channels.Selector ;
 import java.nio.channels.SocketChannel ;
 
@@ -98,6 +100,14 @@
      * @param a_key the key of the client sending the request
      */
     void inputRecieved( ClientKey a_key ) ;
+
+    /**
+     * Monitors input read from a client socket channel.
+     * 
+     * @param a_buffer the input recieved
+     * @param a_key the key of the client sending the request
+     */
+    void inputRecieved( ByteBuffer a_buffer, ClientKey a_key ) ;
 
     
     // ------------------------------------------------------------------------

Modified: incubator/directory/eve/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java
==============================================================================
--- incubator/directory/eve/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java
(original)
+++ incubator/directory/eve/trunk/eve/frontend/input/spi/src/java/org/apache/eve/input/InputManagerMonitorAdapter.java
Mon Feb 16 23:17:04 2004
@@ -51,6 +51,8 @@
 
 
 import java.io.IOException ;
+
+import java.nio.ByteBuffer ;
 import java.nio.channels.Selector ; 
 import java.nio.channels.SocketChannel ;
 
@@ -179,6 +181,15 @@
      * java.nio.channels.Selector)
      */
     public void selectTimedOut( Selector a_selector )
+    {
+    }
+    
+    
+    /* (non-Javadoc)
+     * @see org.apache.eve.input.InputManagerMonitor#inputRecieved(
+     * java.nio.ByteBuffer, org.apache.eve.listener.ClientKey)
+     */
+    public void inputRecieved( ByteBuffer a_buffer, ClientKey a_key )
     {
     }
 }

Mime
View raw message