Package org.apache.activemq.broker.jmx

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


            if (!filterMBeans(obj)) {
                continue;
            }
            ObjectName topicName = obj.getObjectName();

            TopicViewMBean topicView = MBeanServerInvocationHandler.
                newProxyInstance(createJmxConnection(), topicName, TopicViewMBean.class, true);

            context.print(String.format(Locale.US, tableRow,
                    topicView.getName(),
                    topicView.getQueueSize(),
                    topicView.getProducerCount(),
                    topicView.getConsumerCount(),
                    topicView.getEnqueueCount(),
                    topicView.getDequeueCount(),
                    topicView.getForwardCount(),
                    topicView.getMemoryPercentUsage()));
        }
    }
View Full Code Here


        return proxy;
    }

    protected TopicViewMBean getProxyToTopic(String name) throws MalformedObjectNameException, JMSException {
        ObjectName topicViewMBeanName = new ObjectName("org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Topic,destinationName="+name);
        TopicViewMBean proxy = (TopicViewMBean) brokerService.getManagementContext()
                .newProxyInstance(topicViewMBeanName, TopicViewMBean.class, true);
        return proxy;
    }
View Full Code Here

        return proxy;
    }

    protected TopicViewMBean getProxyToTopic(String name) throws MalformedObjectNameException, JMSException {
        ObjectName topicViewMBeanName = new ObjectName("org.apache.activemq:type=Broker,brokerName=localhost,destinationType=Topic,destinationName="+name);
        TopicViewMBean proxy = (TopicViewMBean) brokerService.getManagementContext()
                .newProxyInstance(topicViewMBeanName, TopicViewMBean.class, true);
        return proxy;
    }
View Full Code Here

            if (!filterMBeans(obj)) {
                continue;
            }
            ObjectName topicName = obj.getObjectName();

            TopicViewMBean topicView = MBeanServerInvocationHandler.
                newProxyInstance(createJmxConnection(), topicName, TopicViewMBean.class, true);

            context.print(String.format(Locale.US, tableRow,
                    topicView.getName(),
                    topicView.getQueueSize(),
                    topicView.getProducerCount(),
                    topicView.getConsumerCount(),
                    topicView.getEnqueueCount(),
                    topicView.getDequeueCount(),
                    topicView.getMemoryPercentUsage()));
        }
    }
View Full Code Here

            name += ",Destination=" + temp.getTopicName().replaceAll(":", "_");
            fail("Should have failed creating a temp topic");
        } catch (Exception ignore) {}
       
        ObjectName objName = new ObjectName(name);
        TopicViewMBean mbean = (TopicViewMBean)broker.getManagementContext().newProxyInstance(objName, TopicViewMBean.class, true);
        try {
            System.out.println(mbean.getName());
            fail("Shouldn't have created a temp topic");
        } catch (Exception ignore) {}
    }
View Full Code Here

TOP

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

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.