james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [3/4] james-project git commit: JAMES-1735 Add getDefaultDomain to ServerProbe
Date Wed, 18 May 2016 06:21:40 GMT
JAMES-1735 Add getDefaultDomain to ServerProbe


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

Branch: refs/heads/master
Commit: b2d415006d09da8f6a1c6b74c90cb6e2b7fd8150
Parents: 26349aa
Author: Antoine Duprat <aduprat@linagora.com>
Authored: Tue May 10 15:08:40 2016 +0200
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Tue May 17 14:47:10 2016 +0200

----------------------------------------------------------------------
 .../org/apache/james/cli/probe/ServerProbe.java    |  5 +++--
 .../james/cli/probe/impl/JmxServerProbe.java       | 17 +++++++++++------
 .../org/apache/james/utils/GuiceServerProbe.java   |  5 +++++
 3 files changed, 19 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/b2d41500/server/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
----------------------------------------------------------------------
diff --git a/server/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
b/server/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
index bb63bde..8ca3b15 100644
--- a/server/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
+++ b/server/container/cli/src/main/java/org/apache/james/cli/probe/ServerProbe.java
@@ -23,10 +23,9 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.james.rrt.lib.Mappings;
-
 import org.apache.james.adapter.mailbox.SerializableQuota;
 import org.apache.james.mailbox.exception.MailboxException;
+import org.apache.james.rrt.lib.Mappings;
 
 public interface ServerProbe extends Closeable {
     /**
@@ -86,6 +85,8 @@ public interface ServerProbe extends Closeable {
      */
     boolean containsDomain(String domain) throws Exception;
 
+    String getDefaultDomain() throws Exception;
+
     /**
      * Remove domain from the service
      *

http://git-wip-us.apache.org/repos/asf/james-project/blob/b2d41500/server/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
----------------------------------------------------------------------
diff --git a/server/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
b/server/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
index e06c24c..a24724c 100644
--- a/server/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
+++ b/server/container/cli/src/main/java/org/apache/james/cli/probe/impl/JmxServerProbe.java
@@ -58,7 +58,7 @@ public class JmxServerProbe implements ServerProbe {
 
     private JMXConnector jmxc;
     
-    private DomainListManagementMBean domainListProcxy;
+    private DomainListManagementMBean domainListProxy;
     private RecipientRewriteTableManagementMBean virtualUserTableProxy;
     private UsersRepositoryManagementMBean usersRepositoryProxy;
     private MailboxCopierManagementMBean mailboxCopierManagement;
@@ -109,7 +109,7 @@ public class JmxServerProbe implements ServerProbe {
         
         try {
             ObjectName name = new ObjectName(DOMAINLIST_OBJECT_NAME);
-            domainListProcxy = MBeanServerInvocationHandler.newProxyInstance(
+            domainListProxy = MBeanServerInvocationHandler.newProxyInstance(
                     mbeanServerConn, name, DomainListManagementMBean.class, true);
             name = new ObjectName(VIRTUALUSERTABLE_OBJECT_NAME);
             virtualUserTableProxy = MBeanServerInvocationHandler
@@ -164,22 +164,27 @@ public class JmxServerProbe implements ServerProbe {
 
     @Override
     public boolean containsDomain(String domain) throws Exception {
-        return domainListProcxy.containsDomain(domain);
+        return domainListProxy.containsDomain(domain);
+    }
+
+    @Override
+    public String getDefaultDomain() throws Exception {
+        return domainListProxy.getDefaultDomain();
     }
 
     @Override
     public void addDomain(String domain) throws Exception {
-        domainListProcxy.addDomain(domain);
+        domainListProxy.addDomain(domain);
     }
 
     @Override
     public void removeDomain(String domain) throws Exception {
-        domainListProcxy.removeDomain(domain);
+        domainListProxy.removeDomain(domain);
     }
 
     @Override
     public List<String> listDomains() throws Exception {
-        return domainListProcxy.getDomains();
+        return domainListProxy.getDomains();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/b2d41500/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceServerProbe.java
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceServerProbe.java
b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceServerProbe.java
index fc8e9bd..8d5b734 100644
--- a/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceServerProbe.java
+++ b/server/container/guice/guice-common/src/main/java/org/apache/james/utils/GuiceServerProbe.java
@@ -118,6 +118,11 @@ public class GuiceServerProbe implements ExtendedServerProbe {
     }
 
     @Override
+    public String getDefaultDomain() throws Exception {
+        return domainList.getDefaultDomain();
+    }
+
+    @Override
     public void removeDomain(String domain) throws Exception {
         domainList.removeDomain(domain);
     }


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