Here you can find the source of getMbeans( final MBeanServerConnection mBeanServerConnection)
Parameter | Description |
---|---|
mBeanServerConnection | the MBean server open connection |
Parameter | Description |
---|---|
MalformedObjectNameException | throws malformed object name exception |
IOException | throws I/O exception |
public static Set<ObjectInstance> getMbeans( final MBeanServerConnection mBeanServerConnection) throws MalformedObjectNameException, IOException
//package com.java2s; /*//from w w w.ja v a 2 s .c o m * Copyright (c) 2015 Jeremy Miller * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import java.io.IOException; import java.util.Set; import javax.management.MBeanServerConnection; import javax.management.MalformedObjectNameException; import javax.management.ObjectInstance; import javax.management.ObjectName; public class Main { /** * Return a list of ZMQ MBean instances. * @param mBeanServerConnection the MBean server open connection * @return return the current list ZMQ object instances * @throws MalformedObjectNameException throws malformed object name exception * @throws IOException throws I/O exception */ public static Set<ObjectInstance> getMbeans( final MBeanServerConnection mBeanServerConnection) throws MalformedObjectNameException, IOException { final ObjectName objectQueryName = new ObjectName( "org.zeromq:type=ZMQ,*"); final Set<ObjectInstance> objectInstances = mBeanServerConnection .queryMBeans(objectQueryName, null); return objectInstances; } }