activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6093
Date Thu, 17 Dec 2015 18:55:18 GMT
Repository: activemq
Updated Branches:
  refs/heads/master a253ad3c7 -> 46654b2de


https://issues.apache.org/jira/browse/AMQ-6093

Remove deprecated URL accessors from BrokerViewMBean

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/46654b2d
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/46654b2d
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/46654b2d

Branch: refs/heads/master
Commit: 46654b2dee910647692745d95c9043ee271380ea
Parents: a253ad3
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Dec 17 13:55:08 2015 -0500
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu Dec 17 13:55:08 2015 -0500

----------------------------------------------------------------------
 .../apache/activemq/broker/jmx/BrokerView.java  | 82 +++++---------------
 .../activemq/broker/jmx/BrokerViewMBean.java    | 34 +-------
 2 files changed, 22 insertions(+), 94 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/46654b2d/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
index 98417b1..d9bbcfe 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerView.java
@@ -41,12 +41,12 @@ import org.apache.activemq.util.BrokerSupport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- *
- */
 public class BrokerView implements BrokerViewMBean {
+
     private static final Logger LOG = LoggerFactory.getLogger(BrokerView.class);
+
     ManagedRegionBroker broker;
+
     private final BrokerService brokerService;
     private final AtomicInteger sessionIdCounter = new AtomicInteger(0);
     private ObjectName jmsJobScheduler;
@@ -130,8 +130,7 @@ public class BrokerView implements BrokerViewMBean {
     }
 
     @Override
-    public void stopGracefully(String connectorName, String queueName, long timeout, long
pollInterval)
-            throws Exception {
+    public void stopGracefully(String connectorName, String queueName, long timeout, long
pollInterval) throws Exception {
         brokerService.stopGracefully(connectorName, queueName, timeout, pollInterval);
     }
 
@@ -216,12 +215,12 @@ public class BrokerView implements BrokerViewMBean {
 
     @Override
     public long getTempLimit() {
-       return brokerService.getSystemUsage().getTempUsage().getLimit();
+        return brokerService.getSystemUsage().getTempUsage().getLimit();
     }
 
     @Override
     public int getTempPercentUsage() {
-       return brokerService.getSystemUsage().getTempUsage().getPercentUsage();
+        return brokerService.getSystemUsage().getTempUsage().getPercentUsage();
     }
 
     @Override
@@ -397,12 +396,14 @@ public class BrokerView implements BrokerViewMBean {
 
     @Override
     public void addTopic(String name) throws Exception {
-        safeGetBroker().getContextBroker().addDestination(BrokerSupport.getConnectionContext(safeGetBroker().getContextBroker()),
new ActiveMQTopic(name),true);
+        safeGetBroker().getContextBroker()
+            .addDestination(BrokerSupport.getConnectionContext(safeGetBroker().getContextBroker()),
new ActiveMQTopic(name), true);
     }
 
     @Override
     public void addQueue(String name) throws Exception {
-        safeGetBroker().getContextBroker().addDestination(BrokerSupport.getConnectionContext(safeGetBroker().getContextBroker()),
new ActiveMQQueue(name),true);
+        safeGetBroker().getContextBroker()
+            .addDestination(BrokerSupport.getConnectionContext(safeGetBroker().getContextBroker()),
new ActiveMQQueue(name), true);
     }
 
     @Override
@@ -416,8 +417,7 @@ public class BrokerView implements BrokerViewMBean {
     }
 
     @Override
-    public ObjectName createDurableSubscriber(String clientId, String subscriberName, String
topicName,
-                                              String selector) throws Exception {
+    public ObjectName createDurableSubscriber(String clientId, String subscriberName, String
topicName, String selector) throws Exception {
         ConnectionContext context = getConnectionContext();
         context.setBroker(safeGetBroker());
         context.setClientId(clientId);
@@ -455,7 +455,7 @@ public class BrokerView implements BrokerViewMBean {
     }
 
     @Override
-    public  Map<String, String> getTransportConnectors() {
+    public Map<String, String> getTransportConnectors() {
         Map<String, String> answer = new HashMap<String, String>();
         try {
             for (TransportConnector connector : brokerService.getTransportConnectors()) {
@@ -473,46 +473,6 @@ public class BrokerView implements BrokerViewMBean {
     }
 
     @Override
-    @Deprecated
-    /**
-     * @deprecated use {@link #getTransportConnectors()} or {@link #getTransportConnectorByType(String)}
-     */
-    public String getOpenWireURL() {
-        String answer = brokerService.getTransportConnectorURIsAsMap().get("tcp");
-        return answer != null ? answer : "";
-    }
-
-    @Override
-    @Deprecated
-    /**
-     * @deprecated use {@link #getTransportConnectors()} or {@link #getTransportConnectorByType(String)}
-     */
-    public String getStompURL() {
-        String answer = brokerService.getTransportConnectorURIsAsMap().get("stomp");
-        return answer != null ? answer : "";
-    }
-
-    @Override
-    @Deprecated
-    /**
-     * @deprecated use {@link #getTransportConnectors()} or {@link #getTransportConnectorByType(String)}
-     */
-    public String getSslURL() {
-        String answer = brokerService.getTransportConnectorURIsAsMap().get("ssl");
-        return answer != null ? answer : "";
-    }
-
-    @Override
-    @Deprecated
-    /**
-     * @deprecated use {@link #getTransportConnectors()} or {@link #getTransportConnectorByType(String)}
-     */
-    public String getStompSslURL() {
-        String answer = brokerService.getTransportConnectorURIsAsMap().get("stomp+ssl");
-        return answer != null ? answer : "";
-    }
-
-    @Override
     public String getVMURL() {
         URI answer = brokerService.getVmConnectorURI();
         return answer != null ? answer.toString() : "";
@@ -522,7 +482,7 @@ public class BrokerView implements BrokerViewMBean {
     public String getDataDirectory() {
         File file = brokerService.getDataDirectoryFile();
         try {
-            return file != null ? file.getCanonicalPath():"";
+            return file != null ? file.getCanonicalPath() : "";
         } catch (IOException e) {
             return "";
         }
@@ -534,7 +494,7 @@ public class BrokerView implements BrokerViewMBean {
     }
 
     public void setJMSJobScheduler(ObjectName name) {
-        this.jmsJobScheduler=name;
+        this.jmsJobScheduler = name;
     }
 
     @Override
@@ -552,15 +512,15 @@ public class BrokerView implements BrokerViewMBean {
 
     private ConnectionContext getConnectionContext() {
         ConnectionContext context;
-        if(broker == null) {
+        if (broker == null) {
             context = new ConnectionContext();
-
-        }
-        else {
+        } else {
             ConnectionContext sharedContext = BrokerSupport.getConnectionContext(broker.getContextBroker());
-            //Make a local copy of the sharedContext. We do this because we do not want to
set a clientId on the
-            //global sharedContext. Taking a copy of the sharedContext is a good way to make
sure that we are not
-            //messing up the shared context
+            // Make a local copy of the sharedContext. We do this because we do
+            // not want to set a clientId on the
+            // global sharedContext. Taking a copy of the sharedContext is a
+            // good way to make sure that we are not
+            // messing up the shared context
             context = sharedContext.copy();
         }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/46654b2d/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
index d88bb0c..9951803 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/BrokerViewMBean.java
@@ -22,11 +22,6 @@ import javax.management.ObjectName;
 
 import org.apache.activemq.Service;
 
-
-/**
- * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com (for the reloadLog4jProperties
method)
- *
- */
 public interface BrokerViewMBean extends Service {
 
     /**
@@ -299,34 +294,6 @@ public interface BrokerViewMBean extends Service {
     @MBeanInfo(value="Reloads log4j.properties from the classpath.")
     public void reloadLog4jProperties() throws Throwable;
 
-    /**
-     * @deprecated use {@link #getTransportConnectors()} or {@link #getTransportConnectorByType(String)}
-     */
-    @Deprecated
-    @MBeanInfo("The url of the openwire connector - deprecated, use getTransportConnectors
or getTransportConnectorByType instead")
-    String getOpenWireURL();
-
-    /**
-     * @deprecated use {@link #getTransportConnectors()} or {@link #getTransportConnectorByType(String)}
-     */
-    @Deprecated
-    @MBeanInfo("The url of the stomp connector - deprecated, use getTransportConnectors or
getTransportConnectorByType instead")
-    String getStompURL();
-
-    /**
-     * @deprecated use {@link #getTransportConnectors()} or {@link #getTransportConnectorByType(String)}
-     */
-    @Deprecated
-    @MBeanInfo("The url of the SSL connector - deprecated, use getTransportConnectors or
getTransportConnectorByType instead")
-    String getSslURL();
-
-    /**
-     * @deprecated use {@link #getTransportConnectors()} or {@link #getTransportConnectorByType(String)}
-     */
-    @Deprecated
-    @MBeanInfo("The url of the Stomp SSL connector - deprecated, use getTransportConnectors
or getTransportConnectorByType instead")
-    String getStompSslURL();
-
     @MBeanInfo("The url of the VM connector")
     String getVMURL();
 
@@ -341,4 +308,5 @@ public interface BrokerViewMBean extends Service {
 
     @MBeanInfo("JMSJobScheduler")
     ObjectName getJMSJobScheduler();
+
 }


Mime
View raw message