Package org.apache.activemq.broker.jmx

Examples of org.apache.activemq.broker.jmx.NetworkDestinationView


    }


    public void onOutboundMessage(Message message) {
        ActiveMQDestination destination = message.getDestination();
        NetworkDestinationView networkDestinationView = outboundDestinationViewMap.get(destination);
        if (networkDestinationView == null) {
            synchronized (destinationObjectNameMap) {
                if ((networkDestinationView = outboundDestinationViewMap.get(destination)) == null) {
                    ObjectName bridgeObjectName = bridge.getMbeanObjectName();
                    try {
                        ObjectName objectName = BrokerMBeanSupport.createNetworkOutBoundDestinationObjectName(bridgeObjectName, destination);
                        networkDestinationView = new NetworkDestinationView(networkBridgeView, destination.getPhysicalName());
                        AnnotatedMBean.registerMBean(brokerService.getManagementContext(), networkDestinationView, objectName);
                        destinationObjectNameMap.put(destination, objectName);
                        outboundDestinationViewMap.put(destination, networkDestinationView);

                    } catch (Exception e) {
                        LOG.warn("Failed to register " + destination, e);
                    }
                }
            }
        }
        networkDestinationView.messageSent();
    }
View Full Code Here


    }


    public void onInboundMessage(Message message) {
        ActiveMQDestination destination = message.getDestination();
        NetworkDestinationView networkDestinationView = inboundDestinationViewMap.get(destination);
        if (networkDestinationView == null) {
            synchronized (destinationObjectNameMap) {
                if ((networkDestinationView = inboundDestinationViewMap.get(destination)) == null) {
                    ObjectName bridgeObjectName = bridge.getMbeanObjectName();
                    try {
                        ObjectName objectName = BrokerMBeanSupport.createNetworkInBoundDestinationObjectName(bridgeObjectName, destination);
                        networkDestinationView = new NetworkDestinationView(networkBridgeView, destination.getPhysicalName());
                        networkBridgeView.addNetworkDestinationView(networkDestinationView);
                        AnnotatedMBean.registerMBean(brokerService.getManagementContext(), networkDestinationView, objectName);
                        destinationObjectNameMap.put(destination, objectName);
                        inboundDestinationViewMap.put(destination, networkDestinationView);
                    } catch (Exception e) {
                        LOG.warn("Failed to register " + destination, e);
                    }
                }
            }
        }
        networkDestinationView.messageSent();
    }
View Full Code Here

    }


    public void onOutboundMessage(Message message) {
        ActiveMQDestination destination = message.getDestination();
        NetworkDestinationView networkDestinationView = outboundDestinationViewMap.get(destination);
        if (networkDestinationView == null) {
            synchronized (destinationObjectNameMap) {
                if ((networkDestinationView = outboundDestinationViewMap.get(destination)) == null) {
                    ObjectName bridgeObjectName = bridge.getMbeanObjectName();
                    try {
                        ObjectName objectName = BrokerMBeanSupport.createNetworkOutBoundDestinationObjectName(bridgeObjectName, destination);
                        networkDestinationView = new NetworkDestinationView(networkBridgeView, destination.getPhysicalName());
                        AnnotatedMBean.registerMBean(brokerService.getManagementContext(), networkDestinationView, objectName);
                        destinationObjectNameMap.put(destination, objectName);
                        outboundDestinationViewMap.put(destination, networkDestinationView);

                    } catch (Exception e) {
                        LOG.warn("Failed to register " + destination, e);
                    }
                }
            }
        }
        networkDestinationView.messageSent();
    }
View Full Code Here

    }


    public void onInboundMessage(Message message) {
        ActiveMQDestination destination = message.getDestination();
        NetworkDestinationView networkDestinationView = inboundDestinationViewMap.get(destination);
        if (networkDestinationView == null) {
            synchronized (destinationObjectNameMap) {
                if ((networkDestinationView = inboundDestinationViewMap.get(destination)) == null) {
                    ObjectName bridgeObjectName = bridge.getMbeanObjectName();
                    try {
                        ObjectName objectName = BrokerMBeanSupport.createNetworkInBoundDestinationObjectName(bridgeObjectName, destination);
                        networkDestinationView = new NetworkDestinationView(networkBridgeView, destination.getPhysicalName());
                        networkBridgeView.addNetworkDestinationView(networkDestinationView);
                        AnnotatedMBean.registerMBean(brokerService.getManagementContext(), networkDestinationView, objectName);
                        destinationObjectNameMap.put(destination, objectName);
                        inboundDestinationViewMap.put(destination, networkDestinationView);
                    } catch (Exception e) {
                        LOG.warn("Failed to register " + destination, e);
                    }
                }
            }
        }
        networkDestinationView.messageSent();
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.jmx.NetworkDestinationView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.