@Override public long getDequeueCounter() { return bridge.getDequeueCounter(); }
@Override public long getEnqueueCounter() { return bridge.getEnqueueCounter(); }
@Override public String getLocalAddress() { return bridge.getLocalAddress(); }
@Override public String getRemoteAddress() { return bridge.getRemoteAddress(); }
@Override public void start() throws Exception { bridge.start(); }
@Override public void stop() throws Exception { bridge.stop(); }
@Override public void onStop(NetworkBridge bridge) { if (!brokerService.isUseJmx()) { return; } try { ObjectName objectName = bridge.getMbeanObjectName(); if (objectName != null) { brokerService.getManagementContext().unregisterMBean(objectName); } MBeanBridgeDestination mBeanBridgeDestination = destinationObjectNameMap.remove(bridge); if (mBeanBridgeDestination != null){ mBeanBridgeDestination.stop(); } } catch (Throwable e) { LOG.debug("Network bridge could not be unregistered in JMX: {}", e.getMessage(), e); } }
@Override public String getLocalBrokerName() { return bridge.getLocalBrokerName(); }
@Override public String getRemoteBrokerName() { return bridge.getRemoteBrokerName(); }
@Override public long getReceivedCounter() { return bridge.getNetworkBridgeStatistics().getReceivedCount().getCount(); }
protected ObjectName createNetworkBridgeObjectName(NetworkBridge bridge) throws MalformedObjectNameException { return BrokerMBeanSupport.createNetworkBridgeObjectName(connectorName, bridge.getRemoteAddress()); }
bridges.put(uri, bridge); bridge.start(); } catch (Exception e) { ServiceSupport.dispose(localTransport);
@Override protected void handleStop(ServiceStopper stopper) throws Exception { for (Iterator<NetworkBridge> i = bridges.values().iterator(); i.hasNext();) { NetworkBridge bridge = i.next(); try { bridge.stop(); } catch (Exception e) { stopper.onException(this, e); } } bridges.clear(); activeEvents.clear(); try { this.discoveryAgent.stop(); } catch (Exception e) { stopper.onException(this, e); } super.handleStop(stopper); }
public void onOutboundMessage(Message message) { ActiveMQDestination destination = message.getDestination(); NetworkDestinationContainer networkDestinationContainer; if ((networkDestinationContainer = outboundDestinationViewMap.get(destination)) == null) { ObjectName bridgeObjectName = bridge.getMbeanObjectName(); try { ObjectName objectName = BrokerMBeanSupport.createNetworkOutBoundDestinationObjectName(bridgeObjectName, destination); NetworkDestinationView networkDestinationView = new NetworkDestinationView(networkBridgeView, destination.getPhysicalName()); AnnotatedMBean.registerMBean(brokerService.getManagementContext(), networkDestinationView, objectName); networkDestinationContainer = new NetworkDestinationContainer(networkDestinationView, objectName); outboundDestinationViewMap.put(destination, networkDestinationContainer); networkDestinationView.messageSent(); } catch (Exception e) { LOG.warn("Failed to register " + destination, e); } } else { networkDestinationContainer.view.messageSent(); } }
@Override public String getLocalBrokerName() { return bridge.getLocalBrokerName(); }
@Override public String getRemoteBrokerName() { return bridge.getRemoteBrokerName(); }
@Override public long getReceivedCounter() { return bridge.getNetworkBridgeStatistics().getReceivedCount().getCount(); }
protected ObjectName createNetworkBridgeObjectName(NetworkBridge bridge) throws MalformedObjectNameException { return BrokerMBeanSupport.createNetworkBridgeObjectName(getObjectName(), bridge.getRemoteAddress()); }
@Override public void start() throws Exception { bridge.start(); }
@Override public void stop() throws Exception { bridge.stop(); }