james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1049092 - /james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/
Date Tue, 14 Dec 2010 14:00:01 GMT
Author: norman
Date: Tue Dec 14 14:00:01 2010
New Revision: 1049092

URL: http://svn.apache.org/viewvc?rev=1049092&view=rev
Log:
Add javadocs

Modified:
    james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerResultJMXMonitor.java
    james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerStats.java
    james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractConnectHandlerResultJMXMonitor.java
    james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractLineHandlerResultJMXMonitor.java
    james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/ConnectHandlerStats.java
    james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/HandlerStatsMBean.java
    james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/LineHandlerStats.java

Modified: james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerResultJMXMonitor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerResultJMXMonitor.java?rev=1049092&r1=1049091&r2=1049092&view=diff
==============================================================================
--- james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerResultJMXMonitor.java
(original)
+++ james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerResultJMXMonitor.java
Tue Dec 14 14:00:01 2010
@@ -85,6 +85,13 @@ public abstract class AbstractCommandHan
         }
     }
     
+    /**
+     * Create the {@link AbstractCommandHandlerStats} for the given {@link CommandHandler}
+     * 
+     * @param handler
+     * @return stats
+     * @throws Exception
+     */
     protected abstract AbstractCommandHandlerStats<R> createCommandHandlerStats(CommandHandler<S>
handler) throws Exception;
 
 }

Modified: james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerStats.java
URL: http://svn.apache.org/viewvc/james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerStats.java?rev=1049092&r1=1049091&r2=1049092&view=diff
==============================================================================
--- james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerStats.java
(original)
+++ james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractCommandHandlerStats.java
Tue Dec 14 14:00:01 2010
@@ -59,6 +59,11 @@ public abstract class AbstractCommandHan
     }
     
     
+    /**
+     * Increment stats based on the given response
+     * 
+     * @param response
+     */
     public void increment(R response) {
         if (response.isEndSession()) {
             disconnect.incrementAndGet();
@@ -68,6 +73,11 @@ public abstract class AbstractCommandHan
         incrementStats(response);
     }
     
+    /**
+     * Subclasses need to implement this to handle more precise stats
+     * 
+     * @param response
+     */
     protected abstract void incrementStats(R response);
     /*
      * (non-Javadoc)

Modified: james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractConnectHandlerResultJMXMonitor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractConnectHandlerResultJMXMonitor.java?rev=1049092&r1=1049091&r2=1049092&view=diff
==============================================================================
--- james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractConnectHandlerResultJMXMonitor.java
(original)
+++ james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractConnectHandlerResultJMXMonitor.java
Tue Dec 14 14:00:01 2010
@@ -32,6 +32,11 @@ import org.apache.james.protocols.api.Ex
 import org.apache.james.protocols.api.ProtocolSession;
 import org.apache.james.protocols.api.WiringException;
 
+/**
+ * Handler which will gather statistics for {@link ConnectHandler}'s
+ *
+ * @param <S>
+ */
 public abstract class AbstractConnectHandlerResultJMXMonitor<S extends ProtocolSession>
implements ConnectHandlerResultHandler<S>, ExtensibleHandler, Configurable{
 
     private Map<String, ConnectHandlerStats> cStats = new HashMap<String, ConnectHandlerStats>();

Modified: james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractLineHandlerResultJMXMonitor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractLineHandlerResultJMXMonitor.java?rev=1049092&r1=1049091&r2=1049092&view=diff
==============================================================================
--- james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractLineHandlerResultJMXMonitor.java
(original)
+++ james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/AbstractLineHandlerResultJMXMonitor.java
Tue Dec 14 14:00:01 2010
@@ -32,6 +32,12 @@ import org.apache.james.protocols.api.Li
 import org.apache.james.protocols.api.ProtocolSession;
 import org.apache.james.protocols.api.WiringException;
 
+/**
+ * Handler which will gather statistics for {@link LineHandler}'s
+
+ *
+ * @param <S>
+ */
 public abstract class AbstractLineHandlerResultJMXMonitor<S extends ProtocolSession>
implements LineHandlerResultHandler<S>, ExtensibleHandler, Configurable{
 
     private Map<String, LineHandlerStats> lStats = new HashMap<String, LineHandlerStats>();

Modified: james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/ConnectHandlerStats.java
URL: http://svn.apache.org/viewvc/james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/ConnectHandlerStats.java?rev=1049092&r1=1049091&r2=1049092&view=diff
==============================================================================
--- james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/ConnectHandlerStats.java
(original)
+++ james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/ConnectHandlerStats.java
Tue Dec 14 14:00:01 2010
@@ -49,8 +49,13 @@ public class ConnectHandlerStats extends
         mbeanserver.registerMBean(this, baseObjectName);
     }
     
-    public void increment(boolean result) {
-        if (result) {
+    /**
+     * Increment stats
+     * 
+     * @param disconnected
+     */
+    public void increment(boolean disconnected) {
+        if (disconnected) {
             disconnect .incrementAndGet();
         }
         all.incrementAndGet();

Modified: james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/HandlerStatsMBean.java
URL: http://svn.apache.org/viewvc/james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/HandlerStatsMBean.java?rev=1049092&r1=1049091&r2=1049092&view=diff
==============================================================================
--- james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/HandlerStatsMBean.java
(original)
+++ james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/HandlerStatsMBean.java
Tue Dec 14 14:00:01 2010
@@ -18,6 +18,11 @@
  ****************************************************************/
 package org.apache.james.socket;
 
+/**
+ * JMX MBean for Handler statistics
+ * 
+ *
+ */
 public interface HandlerStatsMBean {
 
     

Modified: james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/LineHandlerStats.java
URL: http://svn.apache.org/viewvc/james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/LineHandlerStats.java?rev=1049092&r1=1049091&r2=1049092&view=diff
==============================================================================
--- james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/LineHandlerStats.java
(original)
+++ james/server/trunk/netty-socket/src/main/java/org/apache/james/socket/LineHandlerStats.java
Tue Dec 14 14:00:01 2010
@@ -31,6 +31,11 @@ import javax.management.StandardMBean;
 
 import org.apache.james.lifecycle.Disposable;
 
+/**
+ * Gather stats for LineHandlers
+ * 
+ *
+ */
 public class LineHandlerStats extends StandardMBean implements HandlerStatsMBean, Disposable{
 
     private String name;
@@ -49,8 +54,13 @@ public class LineHandlerStats extends St
         mbeanserver.registerMBean(this, baseObjectName);
     }
     
-    public void increment(boolean result) {
-        if (result) {
+    /**
+     * Increment the stats 
+     * 
+     * @param result
+     */
+    public void increment(boolean disconnected) {
+        if (disconnected) {
             disconnect .incrementAndGet();
         }
         all.incrementAndGet();



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message