List of utility methods to do MBean
Map | getMBeanConnections(final Map get M Bean Connections Map<String, MBeanServerConnection> mBeanConnections = Maps.newConcurrentMap(); for (String service : connectors.keySet()) { mBeanConnections.put(service, connectors.get(service).getMBeanServerConnection()); return mBeanConnections; |
ObjectName | getMBeanName(final String serviceName, final String nameName) get M Bean Name ObjectName name = null; try { name = new ObjectName("Lily:" + "service=" + serviceName + ",name=" + nameName); } catch (MalformedObjectNameException e) { throw new RuntimeException(e); return name; |
Set | getMbeans(final MBeanServerConnection mBeanServerConnection) Return a list of ZMQ MBean instances. final ObjectName objectQueryName = new ObjectName("org.zeromq:type=ZMQ,*"); final Set<ObjectInstance> objectInstances = mBeanServerConnection.queryMBeans(objectQueryName, null); return objectInstances; |
MBeanServer | getMBeanServer() get M Bean Server List servers = MBeanServerFactory.findMBeanServer(null);
return servers == null || servers.size() == 0 ? null : (MBeanServer) servers.get(0);
|
MBeanServer | getMbeanServer() get Mbean Server synchronized (synchThis) { if (mbeanServer != null) { return mbeanServer; mbeanServer = MBeanServerFactory.findMBeanServer(null).iterator().next(); return mbeanServer; |
MBeanServer | getMBeanServer() return the local MbeanServer by using the system property jboss.remoting.jmxid which is set by the NetworkRegistry MBean when registered in the mbean server ArrayList list = MBeanServerFactory.findMBeanServer(System.getProperty("jboss.remoting.jmxid")); if (list.isEmpty()) { return null; return (MBeanServer) list.iterator().next(); |
MBeanServer | getMBeanServer() get M Bean Server if (mbserver == null) { final ArrayList<MBeanServer> mbservers = MBeanServerFactory.findMBeanServer(null); if (mbservers.size() > 0) { mbserver = mbservers.get(0); if (mbserver == null) { mbserver = MBeanServerFactory.createMBeanServer(); return mbserver; |
MBeanServer | getMBeanServer() get M Bean Server if (mbeanServer == null) { if (MBeanServerFactory.findMBeanServer(null).size() > 0) { mbeanServer = MBeanServerFactory.findMBeanServer(null).get(0); } else { mbeanServer = MBeanServerFactory.createMBeanServer(); return mbeanServer; ... |
MBeanServer | getMBeanServer() get M Bean Server ArrayList<MBeanServer> servers = MBeanServerFactory.findMBeanServer(null); if (servers != null && !servers.isEmpty()) { for (int i = 0; i < servers.size(); i++) { MBeanServer server = servers.get(i); if (DOMAIN_NAME.equalsIgnoreCase(server.getDefaultDomain())) { return server; return (MBeanServer) servers.get(0); } else { return MBeanServerFactory.createMBeanServer(DOMAIN_NAME); |
MBeanServerConnection | getMBeanServerConnection(final JMXConnector connector) get M Bean Server Connection try { return connector.getMBeanServerConnection(); } catch (Exception ex) { throw new RuntimeException("Failed to get MBeanServerConnection from [" + connector + "]", ex); |