directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r718558 - /directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java
Date Tue, 18 Nov 2008 11:12:33 GMT
Author: elecharny
Date: Tue Nov 18 03:12:32 2008
New Revision: 718558

URL: http://svn.apache.org/viewvc?rev=718558&view=rev
Log:
o Added the missing javadoc
o Removed the useless methods, as they are already handled by the parent class

Modified:
    directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java

Modified: directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java?rev=718558&r1=718557&r2=718558&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java
(original)
+++ directory/apacheds/branches/apacheds-mina2/protocol-ntp/src/main/java/org/apache/directory/server/ntp/protocol/NtpProtocolHandler.java
Tue Nov 18 03:12:32 2008
@@ -26,12 +26,15 @@
 import org.apache.directory.server.ntp.service.NtpServiceImpl;
 import org.apache.mina.core.service.IoHandlerAdapter;
 import org.apache.mina.core.session.IoSession;
-import org.apache.mina.filter.codec.ProtocolCodecFilter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 /**
+ * The NTP protocol handler. It implements the {@link IoHandler#messageReceived} method,
+ * which returns the NTP reply. The {@link IoHandler#exceptionCaught} is also implemented,
+ * all the other methods are handled by the {@link IoHandlerAdapter} class.<br/>
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
@@ -40,63 +43,13 @@
     /** the log for this class */
     private static final Logger log = LoggerFactory.getLogger( NtpProtocolHandler.class );
 
+    /** The NtpService instance */
     private NtpService ntpService = new NtpServiceImpl();
 
 
     /**
      * {@inheritDoc}
      */
-    public void sessionCreated( IoSession session ) throws Exception
-    {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( "{} CREATED", session.getRemoteAddress() );
-        }
-
-        // Inject the Codec filter in the chain 
-        //session.getFilterChain().addFirst( "codec", new ProtocolCodecFilter( NtpProtocolCodecFactory.getInstance()
) );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public void sessionOpened( IoSession session )
-    {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( "{} OPENED", session.getRemoteAddress() );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void sessionClosed( IoSession session )
-    {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( "{} CLOSED", session.getRemoteAddress() );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public void sessionIdle( IoSession session, IdleStatus status )
-    {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( "{} IDLE ({})", session.getRemoteAddress(), status );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public void exceptionCaught( IoSession session, Throwable cause )
     {
         log.error( session.getRemoteAddress() + " EXCEPTION", cause );
@@ -118,16 +71,4 @@
 
         session.write( reply );
     }
-
-
-    /**
-     * {@inheritDoc}
-     *
-    public void messageSent( IoSession session, Object message )
-    {
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( "{} SENT:  {}", session.getRemoteAddress(), message );
-        }
-    }*/
 }



Mime
View raw message