mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3108 - network bridges in web console
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1053886 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d0a1a001a3
commit
ebcab0512c
|
@ -76,6 +76,8 @@
|
||||||
<a href="<c:url value='/subscribers.jsp'/>" title="Subscribers">Subscribers</a>
|
<a href="<c:url value='/subscribers.jsp'/>" title="Subscribers">Subscribers</a>
|
||||||
|
|
|
|
||||||
<a href="<c:url value='/connections.jsp'/>" title="Connections">Connections</a>
|
<a href="<c:url value='/connections.jsp'/>" title="Connections">Connections</a>
|
||||||
|
|
|
||||||
|
<a href="<c:url value='/network.jsp'/>" title="Network">Network</a>
|
||||||
|
|
|
|
||||||
<a href="<c:url value='/scheduled.jsp'/>" title="Scheduled">Scheduled</a>
|
<a href="<c:url value='/scheduled.jsp'/>" title="Scheduled">Scheduled</a>
|
||||||
|
|
|
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
<%--
|
||||||
|
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.
|
||||||
|
--%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Network Bridges</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div style="margin-top: 5em">
|
||||||
|
<h2>Network Bridges</h2>
|
||||||
|
|
||||||
|
<table id="bridges" class="sortable autostripe">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Remote Broker</th>
|
||||||
|
<th>Remote Address</th>
|
||||||
|
<th>Messages Enqueued</th>
|
||||||
|
<th>Messages Dequeued</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<c:forEach items="${requestContext.brokerQuery.networkBridges}" var="nb">
|
||||||
|
<tr>
|
||||||
|
<td>${nb.remoteBrokerName}</td>
|
||||||
|
<td>${nb.remoteAddress}</td>
|
||||||
|
<td>${nb.enqueueCounter}</td>
|
||||||
|
<td>${nb.dequeueCounter}</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -17,15 +17,8 @@
|
||||||
package org.apache.activemq.web;
|
package org.apache.activemq.web;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import org.apache.activemq.broker.jmx.BrokerViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.ConnectionViewMBean;
|
import org.apache.activemq.broker.jmx.*;
|
||||||
import org.apache.activemq.broker.jmx.ConnectorViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.DurableSubscriptionViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.JobSchedulerViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.NetworkConnectorViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.QueueViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.TopicViewMBean;
|
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -163,7 +156,18 @@ public interface BrokerFacade {
|
||||||
*/
|
*/
|
||||||
Collection<NetworkConnectorViewMBean> getNetworkConnectors()
|
Collection<NetworkConnectorViewMBean> getNetworkConnectors()
|
||||||
throws Exception;
|
throws Exception;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* The brokers network bridges.
|
||||||
|
*
|
||||||
|
* @return not <code>null</code>
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
Collection<NetworkBridgeViewMBean> getNetworkBridges()
|
||||||
|
throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
* Purges the given destination
|
* Purges the given destination
|
||||||
*
|
*
|
||||||
* @param destination
|
* @param destination
|
||||||
|
|
|
@ -26,17 +26,8 @@ import javax.management.ObjectName;
|
||||||
import javax.management.QueryExp;
|
import javax.management.QueryExp;
|
||||||
import javax.management.openmbean.CompositeData;
|
import javax.management.openmbean.CompositeData;
|
||||||
import javax.management.openmbean.TabularData;
|
import javax.management.openmbean.TabularData;
|
||||||
import org.apache.activemq.broker.jmx.BrokerViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.ConnectionViewMBean;
|
import org.apache.activemq.broker.jmx.*;
|
||||||
import org.apache.activemq.broker.jmx.ConnectorViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.DestinationViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.DurableSubscriptionViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.JobSchedulerViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.ManagementContext;
|
|
||||||
import org.apache.activemq.broker.jmx.NetworkConnectorViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.QueueViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
|
|
||||||
import org.apache.activemq.broker.jmx.TopicViewMBean;
|
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -181,6 +172,14 @@ public abstract class BrokerFacadeSupport implements BrokerFacade {
|
||||||
NetworkConnectorViewMBean.class);
|
NetworkConnectorViewMBean.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<NetworkBridgeViewMBean> getNetworkBridges() throws Exception {
|
||||||
|
String brokerName = getBrokerName();
|
||||||
|
ObjectName query = new ObjectName("org.apache.activemq:BrokerName=" + brokerName + ",Type=NetworkBridge,*");
|
||||||
|
Set<ObjectName> queryResult = queryNames(query, null);
|
||||||
|
return getManagedObjects(queryResult.toArray(new ObjectName[queryResult.size()]),
|
||||||
|
NetworkBridgeViewMBean.class);
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Collection<SubscriptionViewMBean> getQueueConsumers(String queueName) throws Exception {
|
public Collection<SubscriptionViewMBean> getQueueConsumers(String queueName) throws Exception {
|
||||||
String brokerName = getBrokerName();
|
String brokerName = getBrokerName();
|
||||||
|
|
Loading…
Reference in New Issue