james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [13/14] james-project git commit: JAMES-1950 Log duration of SMTP commands
Date Fri, 03 Mar 2017 17:26:21 GMT
JAMES-1950 Log duration of SMTP commands


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/4f0c583d
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/4f0c583d
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/4f0c583d

Branch: refs/heads/master
Commit: 4f0c583dfdcddd6fe3edd3f28f7dc8830a51ee9c
Parents: 90ec55b
Author: benwa <btellier@linagora.com>
Authored: Thu Mar 2 10:36:41 2017 +0700
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Fri Mar 3 18:17:21 2017 +0100

----------------------------------------------------------------------
 .../james/metrics/api/NoopMetricFactory.java    |  58 +++++
 .../james/imap/processor/CopyProcessorTest.java |   1 +
 .../imap/processor/DeleteACLProcessorTest.java  |   1 +
 .../imap/processor/GetACLProcessorTest.java     |   1 +
 .../processor/GetAnnotationProcessorTest.java   |   1 +
 .../imap/processor/GetQuotaProcessorTest.java   |   1 +
 .../processor/GetQuotaRootProcessorTest.java    |   1 +
 .../james/imap/processor/LSubProcessorTest.java |   1 +
 .../james/imap/processor/ListProcessorTest.java |   1 +
 .../imap/processor/ListRightsProcessorTest.java |   1 +
 .../james/imap/processor/MoveProcessorTest.java |   1 +
 .../imap/processor/NamespaceProcessorTest.java  |   1 +
 .../james/imap/processor/NoopMetricFactory.java |  61 -----
 .../imap/processor/SearchProcessorTest.java     |   1 +
 .../imap/processor/SetACLProcessorTest.java     |   1 +
 .../processor/SetAnnotationProcessorTest.java   |   1 +
 .../imap/processor/SetQuotaProcessorTest.java   |   1 +
 protocols/lmtp/pom.xml                          |   4 +
 .../lmtp/LMTPProtocolHandlerChain.java          |  19 +-
 .../protocols/lmtp/core/LhloCmdHandler.java     |  10 +-
 protocols/smtp/dependency-reduced-pom.xml       | 131 +++++++++++
 protocols/smtp/pom.xml                          |   8 +
 .../smtp/SMTPProtocolHandlerChain.java          |  32 +--
 .../smtp/core/AbstractHookableCmdHandler.java   |  28 ++-
 .../protocols/smtp/core/DataCmdHandler.java     |  33 ++-
 .../protocols/smtp/core/HeloCmdHandler.java     |   8 +
 .../protocols/smtp/core/MailCmdHandler.java     |   8 +
 .../protocols/smtp/core/QuitCmdHandler.java     |   9 +
 .../protocols/smtp/core/RcptCmdHandler.java     |   8 +
 .../protocols/smtp/core/UnknownCmdHandler.java  |   8 +
 .../smtp/core/esmtp/EhloCmdHandler.java         |   8 +
 .../protocols/smtp/AbstractSMTPServerTest.java  | 225 ++++++++++---------
 .../smtp/netty/NettyStartTlsSMTPServerTest.java |   3 +-
 server/protocols/protocols-library/pom.xml      |   4 +
 .../lib/mock/MockProtocolHandlerLoader.java     |  10 +-
 .../james/smtpserver/JamesDataCmdHandler.java   |   8 +
 .../james/smtpserver/JamesMailCmdHandler.java   |   8 +-
 .../james/smtpserver/JamesRcptCmdHandler.java   |   8 +-
 38 files changed, 497 insertions(+), 217 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/NoopMetricFactory.java
----------------------------------------------------------------------
diff --git a/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/NoopMetricFactory.java b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/NoopMetricFactory.java
new file mode 100644
index 0000000..6b76cad
--- /dev/null
+++ b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/NoopMetricFactory.java
@@ -0,0 +1,58 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you 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.james.metrics.api;
+
+public class NoopMetricFactory implements MetricFactory {
+
+    @Override
+    public Metric generate(String name) {
+        return new NoopMetric();
+    }
+
+    public static class NoopMetric implements Metric  {
+
+        @Override
+        public void increment() {
+        }
+
+        @Override
+        public void decrement() {
+        }
+        
+    }
+
+    @Override
+    public TimeMetric timer(String name) {
+        return new NoopTimeMetric();
+    }
+
+    public static class NoopTimeMetric implements TimeMetric {
+
+        @Override
+        public String name() {
+            return "";
+        }
+
+
+        @Override
+        public long stopAndPublish() {
+            return 0;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/CopyProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/CopyProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/CopyProcessorTest.java
index d692ab0..3bd3658 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/CopyProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/CopyProcessorTest.java
@@ -46,6 +46,7 @@ import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.MessageRange;
 import org.apache.james.mailbox.store.MailboxMetaData;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/DeleteACLProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/DeleteACLProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/DeleteACLProcessorTest.java
index bac9538..fa4b892 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/DeleteACLProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/DeleteACLProcessorTest.java
@@ -44,6 +44,7 @@ import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.SimpleMailboxACL;
 import org.apache.james.mailbox.model.SimpleMailboxACL.Rfc4314Rights;
 import org.apache.james.mailbox.model.SimpleMailboxACL.SimpleMailboxACLEntryKey;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/GetACLProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/GetACLProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/GetACLProcessorTest.java
index 109d952..840b632 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/GetACLProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/GetACLProcessorTest.java
@@ -42,6 +42,7 @@ import org.apache.james.mailbox.model.MailboxACL;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.SimpleMailboxACL;
 import org.apache.james.mailbox.model.SimpleMailboxACL.Rfc4314Rights;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/GetAnnotationProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/GetAnnotationProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/GetAnnotationProcessorTest.java
index f2c5a93..8d96a52 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/GetAnnotationProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/GetAnnotationProcessorTest.java
@@ -53,6 +53,7 @@ import org.apache.james.mailbox.mock.MockMailboxSession;
 import org.apache.james.mailbox.model.MailboxAnnotation;
 import org.apache.james.mailbox.model.MailboxAnnotationKey;
 import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaProcessorTest.java
index 9d70ba8..162ea9d 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaProcessorTest.java
@@ -40,6 +40,7 @@ import org.apache.james.mailbox.quota.QuotaManager;
 import org.apache.james.mailbox.quota.QuotaRootResolver;
 import org.apache.james.mailbox.store.quota.QuotaImpl;
 import org.apache.james.mailbox.store.quota.QuotaRootImpl;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaRootProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaRootProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaRootProcessorTest.java
index 3d2ed67..f0eb740 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaRootProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/GetQuotaRootProcessorTest.java
@@ -41,6 +41,7 @@ import org.apache.james.mailbox.quota.QuotaManager;
 import org.apache.james.mailbox.quota.QuotaRootResolver;
 import org.apache.james.mailbox.store.quota.QuotaImpl;
 import org.apache.james.mailbox.store.quota.QuotaRootImpl;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JUnit4Mockery;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java
index ff88550..ad486cc 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/LSubProcessorTest.java
@@ -37,6 +37,7 @@ import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.SubscriptionManager;
 import org.apache.james.mailbox.model.MailboxMetaData;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/ListProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/ListProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/ListProcessorTest.java
index f7ce92d..3e956c1 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/ListProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/ListProcessorTest.java
@@ -29,6 +29,7 @@ import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxMetaData;
 import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/ListRightsProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/ListRightsProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/ListRightsProcessorTest.java
index a7b060b..cb425d5 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/ListRightsProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/ListRightsProcessorTest.java
@@ -45,6 +45,7 @@ import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.SimpleMailboxACL;
 import org.apache.james.mailbox.model.SimpleMailboxACL.Rfc4314Rights;
 import org.apache.james.mailbox.model.SimpleMailboxACL.SimpleMailboxACLEntryKey;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/MoveProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/MoveProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/MoveProcessorTest.java
index d95f999..ca96cc8 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/MoveProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/MoveProcessorTest.java
@@ -49,6 +49,7 @@ import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.MessageRange;
 import org.apache.james.mailbox.store.MailboxMetaData;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java
index b075a18..a0d2dc4 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/NamespaceProcessorTest.java
@@ -38,6 +38,7 @@ import org.apache.james.imap.message.response.NamespaceResponse;
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.model.MailboxConstants;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/NoopMetricFactory.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/NoopMetricFactory.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/NoopMetricFactory.java
deleted file mode 100644
index e987f8d..0000000
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/NoopMetricFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  The ASF licenses this file   *
- * to you 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.james.imap.processor;
-
-import org.apache.james.metrics.api.Metric;
-import org.apache.james.metrics.api.MetricFactory;
-import org.apache.james.metrics.api.TimeMetric;
-
-public class NoopMetricFactory implements MetricFactory {
-
-    @Override
-    public Metric generate(String name) {
-        return new NoopMetric();
-    }
-
-    public static class NoopMetric implements Metric  {
-
-        @Override
-        public void increment() {
-        }
-
-        @Override
-        public void decrement() {
-        }
-        
-    }
-
-    @Override
-    public TimeMetric timer(String name) {
-        return new NoopTimeMetric();
-    }
-
-    public static class NoopTimeMetric implements TimeMetric {
-
-        @Override
-        public String name() {
-            return "";
-        }
-
-        @Override
-        public long elapsed() {
-            return 0;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java
index a060422..d30df52 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/SearchProcessorTest.java
@@ -56,6 +56,7 @@ import org.apache.james.mailbox.model.SearchQuery;
 import org.apache.james.mailbox.model.SearchQuery.AddressType;
 import org.apache.james.mailbox.model.SearchQuery.Criterion;
 import org.apache.james.mailbox.model.SearchQuery.DateResolution;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/SetACLProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/SetACLProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/SetACLProcessorTest.java
index 1fa5709..767708d 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/SetACLProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/SetACLProcessorTest.java
@@ -45,6 +45,7 @@ import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.SimpleMailboxACL;
 import org.apache.james.mailbox.model.SimpleMailboxACL.Rfc4314Rights;
 import org.apache.james.mailbox.model.SimpleMailboxACL.SimpleMailboxACLEntryKey;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/SetAnnotationProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/SetAnnotationProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/SetAnnotationProcessorTest.java
index f807dfc..9a11a7c 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/SetAnnotationProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/SetAnnotationProcessorTest.java
@@ -50,6 +50,7 @@ import org.apache.james.mailbox.mock.MockMailboxSession;
 import org.apache.james.mailbox.model.MailboxAnnotation;
 import org.apache.james.mailbox.model.MailboxAnnotationKey;
 import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/imap/src/test/java/org/apache/james/imap/processor/SetQuotaProcessorTest.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/test/java/org/apache/james/imap/processor/SetQuotaProcessorTest.java b/protocols/imap/src/test/java/org/apache/james/imap/processor/SetQuotaProcessorTest.java
index 1cae9d0..80e749e 100644
--- a/protocols/imap/src/test/java/org/apache/james/imap/processor/SetQuotaProcessorTest.java
+++ b/protocols/imap/src/test/java/org/apache/james/imap/processor/SetQuotaProcessorTest.java
@@ -30,6 +30,7 @@ import org.apache.james.imap.message.response.UnpooledStatusResponseFactory;
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.mock.MockMailboxSession;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/lmtp/pom.xml
----------------------------------------------------------------------
diff --git a/protocols/lmtp/pom.xml b/protocols/lmtp/pom.xml
index 65e7260..e9e3111 100644
--- a/protocols/lmtp/pom.xml
+++ b/protocols/lmtp/pom.xml
@@ -53,6 +53,10 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>javax.inject</groupId>
+            <artifactId>javax.inject</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.james.protocols</groupId>
             <artifactId>protocols-netty</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java
----------------------------------------------------------------------
diff --git a/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java b/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java
index b835491..cce63ff 100644
--- a/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java
+++ b/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java
@@ -21,6 +21,7 @@ package org.apache.james.protocols.lmtp;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.apache.james.protocols.api.handler.CommandDispatcher;
 import org.apache.james.protocols.api.handler.CommandHandlerResultLogger;
 import org.apache.james.protocols.api.handler.ProtocolHandler;
@@ -53,15 +54,15 @@ import org.apache.james.protocols.smtp.hook.Hook;
 public class LMTPProtocolHandlerChain extends SMTPProtocolHandlerChain{
 
     public LMTPProtocolHandlerChain() {
-        super();
+        super(new NoopMetricFactory());
     }
 
     public LMTPProtocolHandlerChain(boolean addDefault) {
-        super(addDefault);
+        super(new NoopMetricFactory(), addDefault);
     }
 
     public LMTPProtocolHandlerChain(Hook... hooks) throws WiringException {
-        super(hooks);
+        super(new NoopMetricFactory(), hooks);
     }
 
     @Override
@@ -69,21 +70,21 @@ public class LMTPProtocolHandlerChain extends SMTPProtocolHandlerChain{
         List<ProtocolHandler> defaultHandlers = new ArrayList<ProtocolHandler>();
         defaultHandlers.add(new CommandDispatcher<SMTPSession>());
         defaultHandlers.add(new ExpnCmdHandler());
-        defaultHandlers.add(new LhloCmdHandler());
+        defaultHandlers.add(new LhloCmdHandler(new NoopMetricFactory()));
         defaultHandlers.add(new HelpCmdHandler());
-        defaultHandlers.add(new MailCmdHandler());
+        defaultHandlers.add(new MailCmdHandler(new NoopMetricFactory()));
         defaultHandlers.add(new NoopCmdHandler());
-        defaultHandlers.add(new QuitCmdHandler());
-        defaultHandlers.add(new RcptCmdHandler());
+        defaultHandlers.add(new QuitCmdHandler(new NoopMetricFactory()));
+        defaultHandlers.add(new RcptCmdHandler(new NoopMetricFactory()));
         defaultHandlers.add(new RsetCmdHandler());
         defaultHandlers.add(new VrfyCmdHandler());
-        defaultHandlers.add(new DataCmdHandler());
+        defaultHandlers.add(new DataCmdHandler(new NoopMetricFactory()));
         defaultHandlers.add(new MailSizeEsmtpExtension());
         defaultHandlers.add(new WelcomeMessageHandler());
         defaultHandlers.add(new ReceivedDataLineFilter());
         defaultHandlers.add(new DataLineMessageHookHandler());
         defaultHandlers.add(new StartTlsCmdHandler());
-        defaultHandlers.add(new UnknownCmdHandler());
+        defaultHandlers.add(new UnknownCmdHandler(new NoopMetricFactory()));
         defaultHandlers.add(new CommandHandlerResultLogger());
 
         return defaultHandlers;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LhloCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LhloCmdHandler.java b/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LhloCmdHandler.java
index cbf0a34..8ac286f 100644
--- a/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LhloCmdHandler.java
+++ b/protocols/lmtp/src/main/java/org/apache/james/protocols/lmtp/core/LhloCmdHandler.java
@@ -23,6 +23,9 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 
+import javax.inject.Inject;
+
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.smtp.core.esmtp.EhloCmdHandler;
 
 /**
@@ -31,7 +34,12 @@ import org.apache.james.protocols.smtp.core.esmtp.EhloCmdHandler;
 public class LhloCmdHandler extends EhloCmdHandler {
 
     private static final Collection<String> COMMANDS = Collections.unmodifiableCollection(Arrays.asList("LHLO"));
-    
+
+    @Inject
+    public LhloCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
     @Override
     public Collection<String> getImplCommands() {
         return COMMANDS;

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/dependency-reduced-pom.xml
----------------------------------------------------------------------
diff --git a/protocols/smtp/dependency-reduced-pom.xml b/protocols/smtp/dependency-reduced-pom.xml
new file mode 100644
index 0000000..c926307
--- /dev/null
+++ b/protocols/smtp/dependency-reduced-pom.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>protocols</artifactId>
+    <groupId>org.apache.james</groupId>
+    <version>3.0.0-beta6-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.james.protocols</groupId>
+  <artifactId>protocols-smtp</artifactId>
+  <packaging>bundle</packaging>
+  <name>Apache James :: Protocols :: SMTP</name>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <artifactSet>
+                <includes>
+                  <include>commons-codec:commons-codec</include>
+                </includes>
+              </artifactSet>
+              <filters>
+                <filter>
+                  <artifact>commons-codec:commons-codec</artifact>
+                  <excludes>
+                    <exclude>org/apache/commons/codec/*</exclude>
+                  </excludes>
+                  <includes>
+                    <include>org/apache/commons/codec/binary/*</include>
+                  </includes>
+                </filter>
+              </filters>
+              <relocations>
+                <relocation>
+                  <pattern>org.apache.commons.codec.binary</pattern>
+                  <shadedPattern>org.apache.james.protocols.smtp.util</shadedPattern>
+                </relocation>
+              </relocations>
+              <transformers>
+                <transformer />
+              </transformers>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.james</groupId>
+      <artifactId>james-server-util</artifactId>
+      <version>3.0.0-beta6-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.james.protocols</groupId>
+      <artifactId>protocols-api</artifactId>
+      <version>3.0.0-beta6-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.james.protocols</groupId>
+      <artifactId>protocols-api</artifactId>
+      <version>3.0.0-beta6-SNAPSHOT</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.james.protocols</groupId>
+      <artifactId>protocols-netty</artifactId>
+      <version>3.0.0-beta6-SNAPSHOT</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <version>18.0</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-net</groupId>
+      <artifactId>commons-net</artifactId>
+      <version>3.2</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>io.netty</groupId>
+      <artifactId>netty</artifactId>
+      <version>3.10.6.Final</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <artifactId>hamcrest-core</artifactId>
+          <groupId>org.hamcrest</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>javax.mail</groupId>
+      <artifactId>mail</artifactId>
+      <version>1.4.4</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <artifactId>activation</artifactId>
+          <groupId>javax.activation</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.assertj</groupId>
+      <artifactId>assertj-core</artifactId>
+      <version>1.7.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
+

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/pom.xml
----------------------------------------------------------------------
diff --git a/protocols/smtp/pom.xml b/protocols/smtp/pom.xml
index 7f4c049..d3cbbde 100644
--- a/protocols/smtp/pom.xml
+++ b/protocols/smtp/pom.xml
@@ -53,6 +53,10 @@
             <artifactId>protocols-netty</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>metrics-api</artifactId>
+        </dependency>
+        <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </dependency>
@@ -71,6 +75,10 @@
             <artifactId>netty</artifactId>
         </dependency>
         <dependency>
+            <groupId>javax.inject</groupId>
+            <artifactId>javax.inject</artifactId>
+        </dependency>
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
index f85f3ff..1f3faff 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
@@ -22,12 +22,13 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.api.handler.CommandDispatcher;
+import org.apache.james.protocols.api.handler.CommandHandlerResultLogger;
 import org.apache.james.protocols.api.handler.ExtensibleHandler;
 import org.apache.james.protocols.api.handler.ProtocolHandler;
 import org.apache.james.protocols.api.handler.ProtocolHandlerChain;
 import org.apache.james.protocols.api.handler.ProtocolHandlerChainImpl;
-import org.apache.james.protocols.api.handler.CommandHandlerResultLogger;
 import org.apache.james.protocols.api.handler.WiringException;
 import org.apache.james.protocols.smtp.core.DataCmdHandler;
 import org.apache.james.protocols.smtp.core.DataLineMessageHookHandler;
@@ -58,13 +59,16 @@ import org.apache.james.protocols.smtp.hook.Hook;
  * 
  */
 public class SMTPProtocolHandlerChain extends ProtocolHandlerChainImpl {
-    
-    public SMTPProtocolHandlerChain() {
-        this(true);
+
+    private final MetricFactory metricFactory;
+
+    public SMTPProtocolHandlerChain(MetricFactory metricFactory) {
+        this(metricFactory, true);
     }
 
         
-    public SMTPProtocolHandlerChain(boolean addDefault) {
+    public SMTPProtocolHandlerChain(MetricFactory metricFactory, boolean addDefault) {
+        this.metricFactory = metricFactory;
         if (addDefault) {
             addAll(initDefaultHandlers());      
         }
@@ -76,8 +80,8 @@ public class SMTPProtocolHandlerChain extends ProtocolHandlerChainImpl {
      * @param hooks
      * @throws WiringException
      */
-    public SMTPProtocolHandlerChain(Hook... hooks) throws WiringException {
-        this(true);
+    public SMTPProtocolHandlerChain(MetricFactory metricFactory, Hook... hooks) throws WiringException {
+        this(metricFactory, true);
         for (Hook hook : hooks) {
             add(hook);
         }
@@ -88,23 +92,23 @@ public class SMTPProtocolHandlerChain extends ProtocolHandlerChainImpl {
         List<ProtocolHandler> defaultHandlers = new ArrayList<ProtocolHandler>();
         defaultHandlers.add(new CommandDispatcher<SMTPSession>());
         defaultHandlers.add(new ExpnCmdHandler());
-        defaultHandlers.add(new EhloCmdHandler());
-        defaultHandlers.add(new HeloCmdHandler());
+        defaultHandlers.add(new EhloCmdHandler(metricFactory));
+        defaultHandlers.add(new HeloCmdHandler(metricFactory));
         defaultHandlers.add(new HelpCmdHandler());
-        defaultHandlers.add(new MailCmdHandler());
+        defaultHandlers.add(new MailCmdHandler(metricFactory));
         defaultHandlers.add(new NoopCmdHandler());
-        defaultHandlers.add(new QuitCmdHandler());
-        defaultHandlers.add(new RcptCmdHandler());
+        defaultHandlers.add(new QuitCmdHandler(metricFactory));
+        defaultHandlers.add(new RcptCmdHandler(metricFactory));
         defaultHandlers.add(new RsetCmdHandler());
         defaultHandlers.add(new VrfyCmdHandler());
-        defaultHandlers.add(new DataCmdHandler());
+        defaultHandlers.add(new DataCmdHandler(metricFactory));
         defaultHandlers.add(new MailSizeEsmtpExtension());
         defaultHandlers.add(new WelcomeMessageHandler());
         defaultHandlers.add(new PostmasterAbuseRcptHook());
         defaultHandlers.add(new ReceivedDataLineFilter());
         defaultHandlers.add(new DataLineMessageHookHandler());
         defaultHandlers.add(new StartTlsCmdHandler());
-        defaultHandlers.add(new UnknownCmdHandler());
+        defaultHandlers.add(new UnknownCmdHandler(metricFactory));
         defaultHandlers.add(new CommandHandlerResultLogger());
         return defaultHandlers;
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
index 8a56133..a5d68fa 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/AbstractHookableCmdHandler.java
@@ -22,6 +22,10 @@ package org.apache.james.protocols.smtp.core;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.inject.Inject;
+
+import org.apache.james.metrics.api.MetricFactory;
+import org.apache.james.metrics.api.TimeMetric;
 import org.apache.james.protocols.api.Request;
 import org.apache.james.protocols.api.Response;
 import org.apache.james.protocols.api.handler.CommandHandler;
@@ -39,10 +43,15 @@ import org.apache.james.protocols.smtp.hook.HookReturnCode;
  */
 public abstract class AbstractHookableCmdHandler<Hook extends org.apache.james.protocols.smtp.hook.Hook> implements CommandHandler<SMTPSession>, ExtensibleHandler {
 
-
+    private final MetricFactory metricFactory;
     private List<Hook> hooks;
     private List<HookResultHook> rHooks;
 
+    @Inject
+    public AbstractHookableCmdHandler(MetricFactory metricFactory) {
+        this.metricFactory = metricFactory;
+    }
+
     /**
      * Handle command processing
      * 
@@ -50,20 +59,25 @@ public abstract class AbstractHookableCmdHandler<Hook extends org.apache.james.p
      * #onCommand(org.apache.james.protocols.api.ProtocolSession, Request)
      */
     public Response onCommand(SMTPSession session, Request request) {
+        TimeMetric timeMetric = metricFactory.timer("SMTP-" + request.getCommand().toLowerCase());
         String command = request.getCommand();
         String parameters = request.getArgument();
         Response response = doFilterChecks(session, command, parameters);
 
-        if (response == null) {
-
-            response = processHooks(session, command, parameters);
+        try {
             if (response == null) {
-                return doCoreCmd(session, command, parameters);
+
+                response = processHooks(session, command, parameters);
+                if (response == null) {
+                    return doCoreCmd(session, command, parameters);
+                } else {
+                    return response;
+                }
             } else {
                 return response;
             }
-        } else {
-            return response;
+        } finally {
+            timeMetric.stopAndPublish();
         }
 
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
index 3b82f03..0f51c9f 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/DataCmdHandler.java
@@ -26,8 +26,12 @@ import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 
+import javax.inject.Inject;
+
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
+import org.apache.james.metrics.api.MetricFactory;
+import org.apache.james.metrics.api.TimeMetric;
 import org.apache.james.protocols.api.ProtocolSession;
 import org.apache.james.protocols.api.Request;
 import org.apache.james.protocols.api.Response;
@@ -108,7 +112,14 @@ public class DataCmdHandler implements CommandHandler<SMTPSession>, ExtensibleHa
     }
    
     public final static String MAILENV = "MAILENV";
-    
+
+    private final MetricFactory metricFactory;
+
+    @Inject
+    public DataCmdHandler(MetricFactory metricFactory) {
+        this.metricFactory = metricFactory;
+    }
+
     private LineHandler<SMTPSession> lineHandler;
 
     @Override
@@ -126,13 +137,19 @@ public class DataCmdHandler implements CommandHandler<SMTPSession>, ExtensibleHa
      *
      */
     public Response onCommand(SMTPSession session, Request request) {
-        String parameters = request.getArgument();
-        Response response = doDATAFilter(session,parameters);
-        
-        if (response == null) {
-            return doDATA(session, parameters);
-        } else {
-            return response;
+        TimeMetric timeMetric = metricFactory.timer("SMTP-" + request.getCommand());
+
+        try {
+            String parameters = request.getArgument();
+            Response response = doDATAFilter(session, parameters);
+
+            if (response == null) {
+                return doDATA(session, parameters);
+            } else {
+                return response;
+            }
+        } finally {
+            timeMetric.stopAndPublish();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/HeloCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/HeloCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/HeloCmdHandler.java
index 8995be9..927335c 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/HeloCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/HeloCmdHandler.java
@@ -23,8 +23,11 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 
+import javax.inject.Inject;
+
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.api.ProtocolSession;
 import org.apache.james.protocols.api.ProtocolSession.State;
 import org.apache.james.protocols.api.Response;
@@ -51,6 +54,11 @@ public class HeloCmdHandler extends AbstractHookableCmdHandler<HeloHook> {
                     DSNStatus.DELIVERY_INVALID_ARG)
                     + " Domain address required: " + COMMAND_NAME).immutable();
 
+    @Inject
+    public HeloCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
     @Override
     public void init(Configuration config) throws ConfigurationException {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/MailCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/MailCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/MailCmdHandler.java
index 44a3e72..c2bc110 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/MailCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/MailCmdHandler.java
@@ -28,8 +28,11 @@ import java.util.Locale;
 import java.util.Map;
 import java.util.StringTokenizer;
 
+import javax.inject.Inject;
+
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.api.ProtocolSession.State;
 import org.apache.james.protocols.api.Request;
 import org.apache.james.protocols.api.Response;
@@ -70,6 +73,11 @@ public class MailCmdHandler extends AbstractHookableCmdHandler<MailHook> {
      */
     private Map<String, MailParametersHook> paramHooks;
 
+    @Inject
+    public MailCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
     @Override
     public void init(Configuration config) throws ConfigurationException {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/QuitCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/QuitCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/QuitCmdHandler.java
index 0d74d54..3a177f7 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/QuitCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/QuitCmdHandler.java
@@ -23,8 +23,11 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 
+import javax.inject.Inject;
+
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.api.Response;
 import org.apache.james.protocols.smtp.SMTPResponse;
 import org.apache.james.protocols.smtp.SMTPRetCode;
@@ -54,6 +57,12 @@ public class QuitCmdHandler extends AbstractHookableCmdHandler<QuitHook> {
         SYNTAX_ERROR = response.immutable();
     }
 
+    @Inject
+    public QuitCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
+
     @Override
     public void init(Configuration config) throws ConfigurationException {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/RcptCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/RcptCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/RcptCmdHandler.java
index 52eea5b..4433b03 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/RcptCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/RcptCmdHandler.java
@@ -26,8 +26,11 @@ import java.util.Collections;
 import java.util.Locale;
 import java.util.StringTokenizer;
 
+import javax.inject.Inject;
+
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.api.ProtocolSession.State;
 import org.apache.james.protocols.api.Response;
 import org.apache.james.protocols.api.handler.CommandHandler;
@@ -53,6 +56,11 @@ public class RcptCmdHandler extends AbstractHookableCmdHandler<RcptHook> impleme
     private static final Response SYNTAX_ERROR_DELIVERY = new SMTPResponse(SMTPRetCode.SYNTAX_ERROR_ARGUMENTS, DSNStatus.getStatus(DSNStatus.PERMANENT, DSNStatus.DELIVERY_SYNTAX) + " Syntax error in parameters or arguments").immutable();
     private static final Response SYNTAX_ERROR_ADDRESS = new SMTPResponse(SMTPRetCode.SYNTAX_ERROR_MAILBOX, DSNStatus.getStatus(DSNStatus.PERMANENT, DSNStatus.ADDRESS_SYNTAX) + " Syntax error in recipient address").immutable();
 
+    @Inject
+    public RcptCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
     @Override
     public void init(Configuration config) throws ConfigurationException {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/UnknownCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/UnknownCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/UnknownCmdHandler.java
index 62eb215..1f48a19 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/UnknownCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/UnknownCmdHandler.java
@@ -25,8 +25,11 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 
+import javax.inject.Inject;
+
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.api.ProtocolSession.State;
 import org.apache.james.protocols.api.handler.UnknownCommandHandler;
 import org.apache.james.protocols.api.Response;
@@ -47,6 +50,11 @@ public class UnknownCmdHandler extends AbstractHookableCmdHandler<UnknownHook>{
      */
     private static final Collection<String> COMMANDS = Collections.unmodifiableCollection(Arrays.asList(UnknownCommandHandler.COMMAND_IDENTIFIER));
 
+    @Inject
+    public UnknownCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
     @Override
     public void init(Configuration config) throws ConfigurationException {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/EhloCmdHandler.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/EhloCmdHandler.java b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/EhloCmdHandler.java
index 0c23a72..93561de 100644
--- a/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/EhloCmdHandler.java
+++ b/protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/EhloCmdHandler.java
@@ -24,8 +24,11 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import javax.inject.Inject;
+
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.api.ProtocolSession.State;
 import org.apache.james.protocols.api.Response;
 import org.apache.james.protocols.smtp.SMTPResponse;
@@ -52,6 +55,11 @@ public class EhloCmdHandler extends AbstractHookableCmdHandler<HeloHook> impleme
     
     private List<EhloExtension> ehloExtensions;
 
+    @Inject
+    public EhloCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
     @Override
     public void init(Configuration config) throws ConfigurationException {
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java b/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java
index f6f7d16..b321877 100644
--- a/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java
+++ b/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/AbstractSMTPServerTest.java
@@ -35,6 +35,7 @@ import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.net.smtp.SMTPClient;
 import org.apache.commons.net.smtp.SMTPReply;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.apache.james.protocols.api.Protocol;
 import org.apache.james.protocols.api.ProtocolServer;
 import org.apache.james.protocols.api.Response;
@@ -493,16 +494,16 @@ public abstract class AbstractSMTPServerTest {
     public void testHeloHookPermanentError() throws Exception {
         HeloHook hook = new HeloHook() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public HookResult doHelo(SMTPSession session, String helo) {
                 return new HookResult(HookReturnCode.DENY);
             }
@@ -540,16 +541,16 @@ public abstract class AbstractSMTPServerTest {
     public void testHeloHookTempraryError() throws Exception {
         HeloHook hook = new HeloHook() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public HookResult doHelo(SMTPSession session, String helo) {
                 return new HookResult(HookReturnCode.DENYSOFT);
             }
@@ -586,16 +587,16 @@ public abstract class AbstractSMTPServerTest {
     public void testMailHookPermanentError() throws Exception {
         MailHook hook = new MailHook() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public HookResult doMail(SMTPSession session, MailAddress sender) {
                 return new HookResult(HookReturnCode.DENY);
             }
@@ -635,16 +636,16 @@ public abstract class AbstractSMTPServerTest {
     public void testMailHookTemporaryError() throws Exception {
         MailHook hook = new MailHook() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public HookResult doMail(SMTPSession session, MailAddress sender) {
                 return new HookResult(HookReturnCode.DENYSOFT);
             }
@@ -685,16 +686,16 @@ public abstract class AbstractSMTPServerTest {
     public void testRcptHookPermanentError() throws Exception {
         RcptHook hook = new RcptHook() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public HookResult doRcpt(SMTPSession session, MailAddress sender, MailAddress rcpt) {
                 if (RCPT1.equals(rcpt.toString())) {
                     return new HookResult(HookReturnCode.DENY);
@@ -748,16 +749,16 @@ public abstract class AbstractSMTPServerTest {
     public void testRcptHookTemporaryError() throws Exception {
         RcptHook hook = new RcptHook() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public HookResult doRcpt(SMTPSession session, MailAddress sender, MailAddress rcpt) {
                 if (RCPT1.equals(rcpt.toString())) {
                     return new HookResult(HookReturnCode.DENYSOFT);
@@ -846,16 +847,16 @@ public abstract class AbstractSMTPServerTest {
 
         MessageHook hook = new MessageHook() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public HookResult onMessage(SMTPSession session, MailEnvelope mail) {
                 return new HookResult(HookReturnCode.DENY);
             }
@@ -909,16 +910,16 @@ public abstract class AbstractSMTPServerTest {
 
         MessageHook hook = new MessageHook() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public HookResult onMessage(SMTPSession session, MailEnvelope mail) {
                 return new HookResult(HookReturnCode.DENYSOFT);
             }
@@ -971,16 +972,16 @@ public abstract class AbstractSMTPServerTest {
     public void testConnectHandlerPermananet() throws Exception {
         ConnectHandler<SMTPSession> connectHandler = new ConnectHandler<SMTPSession>() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public Response onConnect(SMTPSession session) {
                 return new SMTPResponse("554", "Bye Bye");
             }
@@ -1013,16 +1014,16 @@ public abstract class AbstractSMTPServerTest {
     public void testConnectHandlerTemporary() throws Exception {
         ConnectHandler<SMTPSession> connectHandler = new ConnectHandler<SMTPSession>() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
             public Response onConnect(SMTPSession session) {
                 return new SMTPResponse("451", "Bye Bye");
             }
@@ -1055,17 +1056,17 @@ public abstract class AbstractSMTPServerTest {
         final AtomicBoolean called = new AtomicBoolean(false);
         DisconnectHandler<SMTPSession> handler = new DisconnectHandler<SMTPSession>() {
 
-            @Override
-            public void init(Configuration config) throws ConfigurationException {
-
-            }
-
-            @Override
-            public void destroy() {
-
-            }
-
-            public void onDisconnect(SMTPSession session) {
+            @Override
+            public void init(Configuration config) throws ConfigurationException {
+
+            }
+
+            @Override
+            public void destroy() {
+
+            }
+
+            public void onDisconnect(SMTPSession session) {
                 called.set(true);
             }
         };
@@ -1102,7 +1103,7 @@ public abstract class AbstractSMTPServerTest {
 
     
     protected Protocol createProtocol(ProtocolHandler... handlers) throws WiringException {
-        SMTPProtocolHandlerChain chain = new SMTPProtocolHandlerChain();
+        SMTPProtocolHandlerChain chain = new SMTPProtocolHandlerChain(new NoopMetricFactory());
         chain.addAll(0, Arrays.asList(handlers));
         chain.wireExtensibleHandlers();
         return new SMTPProtocol(chain, new SMTPConfigurationImpl(), new MockLogger());

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java b/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
index 3c4edd7..66d3f81 100644
--- a/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
+++ b/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
@@ -32,6 +32,7 @@ import javax.mail.internet.MimeMessage;
 
 import org.apache.commons.net.smtp.SMTPReply;
 import org.apache.commons.net.smtp.SMTPSClient;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.apache.james.protocols.api.Encryption;
 import org.apache.james.protocols.api.Protocol;
 import org.apache.james.protocols.api.ProtocolServer;
@@ -87,7 +88,7 @@ public class NettyStartTlsSMTPServerTest {
     }
 
     private Protocol createProtocol(Optional<ProtocolHandler> handler) throws WiringException {
-        SMTPProtocolHandlerChain chain = new SMTPProtocolHandlerChain();
+        SMTPProtocolHandlerChain chain = new SMTPProtocolHandlerChain(new NoopMetricFactory());
         if (handler.isPresent()) {
             chain.add(handler.get());
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/server/protocols/protocols-library/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/protocols-library/pom.xml b/server/protocols/protocols-library/pom.xml
index 9f10b21..44d651d 100644
--- a/server/protocols/protocols-library/pom.xml
+++ b/server/protocols/protocols-library/pom.xml
@@ -53,6 +53,10 @@
             </exclusions>
         </dependency>
         <dependency>
+            <groupId>org.apache.james</groupId>
+            <artifactId>metrics-api</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.apache.james.protocols</groupId>
             <artifactId>protocols-api</artifactId>
         </dependency>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/server/protocols/protocols-library/src/test/java/org/apache/james/protocols/lib/mock/MockProtocolHandlerLoader.java
----------------------------------------------------------------------
diff --git a/server/protocols/protocols-library/src/test/java/org/apache/james/protocols/lib/mock/MockProtocolHandlerLoader.java b/server/protocols/protocols-library/src/test/java/org/apache/james/protocols/lib/mock/MockProtocolHandlerLoader.java
index 4af3a7e..4ec0cc6 100644
--- a/server/protocols/protocols-library/src/test/java/org/apache/james/protocols/lib/mock/MockProtocolHandlerLoader.java
+++ b/server/protocols/protocols-library/src/test/java/org/apache/james/protocols/lib/mock/MockProtocolHandlerLoader.java
@@ -14,6 +14,8 @@ import javax.inject.Inject;
 import javax.inject.Named;
 
 import org.apache.commons.configuration.Configuration;
+import org.apache.james.metrics.api.MetricFactory;
+import org.apache.james.metrics.api.NoopMetricFactory;
 import org.apache.james.protocols.api.handler.ProtocolHandler;
 import org.apache.james.protocols.lib.handler.ProtocolHandlerLoader;
 
@@ -53,8 +55,12 @@ public class MockProtocolHandlerLoader implements ProtocolHandlerLoader{
 
     private final List<Object> loaderRegistry = new ArrayList<Object>();
 
-    protected ProtocolHandler create(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
-        return (ProtocolHandler) Thread.currentThread().getContextClassLoader().loadClass(className).newInstance();
+    protected ProtocolHandler create(String className) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
+        try {
+            return (ProtocolHandler) Thread.currentThread().getContextClassLoader().loadClass(className).newInstance();
+        } catch (InstantiationException e) {
+            return (ProtocolHandler) Thread.currentThread().getContextClassLoader().loadClass(className).getConstructor(MetricFactory.class).newInstance(new NoopMetricFactory());
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesDataCmdHandler.java
----------------------------------------------------------------------
diff --git a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesDataCmdHandler.java b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesDataCmdHandler.java
index 79daae6..30515ae 100644
--- a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesDataCmdHandler.java
+++ b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesDataCmdHandler.java
@@ -18,8 +18,11 @@
  ****************************************************************/
 package org.apache.james.smtpserver;
 
+import javax.inject.Inject;
+
 import org.apache.james.core.MailImpl;
 import org.apache.james.core.MimeMessageInputStreamSource;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.api.ProtocolSession.State;
 import org.apache.james.protocols.smtp.SMTPResponse;
 import org.apache.james.protocols.smtp.SMTPRetCode;
@@ -31,6 +34,11 @@ import org.apache.james.protocols.smtp.core.DataCmdHandler;
  */
 public class JamesDataCmdHandler extends DataCmdHandler {
 
+    @Inject
+    public JamesDataCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
     /**
      * Handler method called upon receipt of a DATA command. Reads in message
      * data, creates header, and delivers to mail server service for delivery.

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesMailCmdHandler.java
----------------------------------------------------------------------
diff --git a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesMailCmdHandler.java b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesMailCmdHandler.java
index 494577c..64f1b34 100644
--- a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesMailCmdHandler.java
+++ b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesMailCmdHandler.java
@@ -22,6 +22,7 @@ import javax.inject.Inject;
 
 import org.apache.james.domainlist.api.DomainList;
 import org.apache.james.domainlist.api.DomainListException;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.smtp.core.MailCmdHandler;
 
 public class JamesMailCmdHandler extends MailCmdHandler {
@@ -29,7 +30,12 @@ public class JamesMailCmdHandler extends MailCmdHandler {
     private DomainList domainList;
 
     @Inject
-    public final void setDomainList(DomainList domainList) {
+    public JamesMailCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
+    @Inject
+    public final void setDomainList(DomainList domainList) {
         this.domainList = domainList;
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/4f0c583d/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesRcptCmdHandler.java
----------------------------------------------------------------------
diff --git a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesRcptCmdHandler.java b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesRcptCmdHandler.java
index ae10a09..551f93c 100644
--- a/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesRcptCmdHandler.java
+++ b/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/JamesRcptCmdHandler.java
@@ -23,6 +23,7 @@ import javax.inject.Inject;
 
 import org.apache.james.domainlist.api.DomainList;
 import org.apache.james.domainlist.api.DomainListException;
+import org.apache.james.metrics.api.MetricFactory;
 import org.apache.james.protocols.smtp.core.RcptCmdHandler;
 
 public class JamesRcptCmdHandler extends RcptCmdHandler {
@@ -30,7 +31,12 @@ public class JamesRcptCmdHandler extends RcptCmdHandler {
     private DomainList domainList;
 
     @Inject
-    public final void setDomainList(DomainList domainList) {
+    public JamesRcptCmdHandler(MetricFactory metricFactory) {
+        super(metricFactory);
+    }
+
+    @Inject
+    public final void setDomainList(DomainList domainList) {
         this.domainList = domainList;
     }
 


---------------------------------------------------------------------
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