mirror of https://github.com/apache/activemq.git
tidied up some cruft
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@389020 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
694120cd29
commit
5bed19f1c5
|
@ -24,6 +24,8 @@ import org.apache.activemq.command.ActiveMQDestination;
|
|||
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 @@ import java.util.Iterator;
|
|||
*/
|
||||
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 @@ public class DestinationDotFileInterceptor extends BrokerFilter {
|
|||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue