activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r389020 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java
Date Mon, 27 Mar 2006 04:37:12 GMT
Author: jstrachan
Date: Sun Mar 26 20:37:11 2006
New Revision: 389020

URL: http://svn.apache.org/viewcvs?rev=389020&view=rev
Log:
tidied up some cruft

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java?rev=389020&r1=389019&r2=389020&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/view/DestinationDotFileInterceptor.java
Sun Mar 26 20:37:11 2006
@@ -24,6 +24,8 @@
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.filter.DestinationMap;
 import org.apache.activemq.filter.DestinationMapNode;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import java.io.FileWriter;
 import java.io.PrintWriter;
@@ -36,20 +38,15 @@
  */
 public class DestinationDotFileInterceptor extends BrokerFilter {
 
+    private static final Log log = LogFactory.getLog(DestinationDotFileInterceptor.class);
     protected static final String ID_SEPARATOR = "_";
     
-    private String file = "ActiveMQDestinations.dot";
+    private String file;
 
     public DestinationDotFileInterceptor(Broker next, String file) {
         super(next);
     }
 
-    public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws
Exception {
-        Subscription answer = super.addConsumer(context, info);
-        //generateDestinationGraph();
-        return answer;
-    }
-
     public Destination addDestination(ConnectionContext context, ActiveMQDestination destination)
throws Exception {
         Destination answer = super.addDestination(context, destination);
         generateDestinationGraph();
@@ -63,7 +60,9 @@
     }
 
     protected void generateDestinationGraph() throws Exception {
-        System.out.println("Autogenerating file: " + file);
+        if (log.isDebugEnabled()) {
+            log.debug("Creating destination DOT file at: " + file);
+        }
         PrintWriter writer = new PrintWriter(new FileWriter(file));
         try {
             generateDestinationGraph(writer);



Mime
View raw message