Examples of queryNames()


Examples of javax.management.MBeanServer.queryNames()

        // everything from o.a.c.concurrent
        logger.info(String.format("%-25s%10s%10s%10s", "Pool Name", "Active", "Pending", "Blocked"));
        Set<ObjectName> request, internal;
        try
        {
            request = server.queryNames(new ObjectName("org.apache.cassandra.request:type=*"), null);
            internal = server.queryNames(new ObjectName("org.apache.cassandra.internal:type=*"), null);
        }
        catch (MalformedObjectNameException e)
        {
            throw new RuntimeException(e);
View Full Code Here

Examples of javax.management.MBeanServer.queryNames()

        logger.info(String.format("%-25s%10s%10s%10s", "Pool Name", "Active", "Pending", "Blocked"));
        Set<ObjectName> request, internal;
        try
        {
            request = server.queryNames(new ObjectName("org.apache.cassandra.request:type=*"), null);
            internal = server.queryNames(new ObjectName("org.apache.cassandra.internal:type=*"), null);
        }
        catch (MalformedObjectNameException e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of javax.management.MBeanServer.queryNames()

    private void listMBeans() {
        final MBeanServer mBeanServer = LocalMBeanServer.get();

        final Set<ObjectName> names;
        try {
            names = mBeanServer.queryNames(null, null);
        } catch (Exception e) {
            streamManager.writeErr(e);
            return;
        }
View Full Code Here

Examples of javax.management.MBeanServer.queryNames()

        ObjectName contextMBean = null;
        ManagementAgent agent = camelContext.getManagementStrategy().getManagementAgent();
        if (agent != null) {
            MBeanServer mBeanServer = agent.getMBeanServer();

            Set<ObjectName> set = mBeanServer.queryNames(new ObjectName(agent.getMBeanObjectDomainName() + ":type=context,name=\"" + name + "\",*"), null);
            Iterator<ObjectName> iterator = set.iterator();
            if (iterator.hasNext()) {
                contextMBean = iterator.next();
            }

View Full Code Here

Examples of javax.management.MBeanServer.queryNames()

        MBeanServer server = getContext().getManagementStrategy().getManagementAgent().getMBeanServer();
        if (server != null) {
            // gather all the routes for this CamelContext, which requires JMX
            ObjectName query = ObjectName.getInstance("org.apache.camel:context=*/" + getContext().getManagementName() + ",type=routes,*");
            Set<ObjectName> routes = server.queryNames(query, null);

            Set<ManagedProcessorMBean> processors = new LinkedHashSet<ManagedProcessorMBean>();
            if (includeProcessors) {
                // gather all the processors for this CamelContext, which requires JMX
                query = ObjectName.getInstance("org.apache.camel:context=*/" + getContext().getManagementName() + ",type=processors,*");
 
View Full Code Here

Examples of javax.management.MBeanServer.queryNames()

            Set<ManagedProcessorMBean> processors = new LinkedHashSet<ManagedProcessorMBean>();
            if (includeProcessors) {
                // gather all the processors for this CamelContext, which requires JMX
                query = ObjectName.getInstance("org.apache.camel:context=*/" + getContext().getManagementName() + ",type=processors,*");
                Set<ObjectName> names = server.queryNames(query, null);
                for (ObjectName on : names) {
                    ManagedProcessorMBean processor = MBeanServerInvocationHandler.newProxyInstance(server, on, ManagedProcessorMBean.class, true);
                    processors.add(processor);
                }
            }
View Full Code Here

Examples of javax.management.MBeanServerConnection.queryNames()

      Properties env = new Properties();
      env.setProperty(Context.PROVIDER_URL, jndiURL);
      InitialContext ctx = new InitialContext(env);
      MBeanServerConnection server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
      ObjectName all = new ObjectName("*:*");
      Set allNames = server.queryNames(all, null);
      ArrayList serverErrors = new ArrayList();
      Iterator names = allNames.iterator();
      int serviceCount = 0;
      while( names.hasNext() )
      {
View Full Code Here

Examples of javax.management.MBeanServerConnection.queryNames()

     
      initURLHandlers();
     
      InitialContext ctx = getInitialContext();
      MBeanServerConnection rmiAdaptor = (MBeanServerConnection)ctx.lookup("jmx/invoker/RMIAdaptor");
      Iterator it = rmiAdaptor.queryNames(null, null).iterator();
      getLog().debug("testMBeanInfoMarshalling:  rmiAdaptor = " + rmiAdaptor);
      while (it.hasNext())  
      {
         ObjectName objectName = (ObjectName)it.next();
         getLog().debug("testMBeanInfoMarshalling:  about to getMBeanInfo for objectName = " + objectName);        
View Full Code Here

Examples of javax.management.MBeanServerConnection.queryNames()

      throws Exception
   {
      // query the mbean server
      MBeanServerConnection server = getMBeanServer();
     
      Set matches = server.queryNames(new ObjectName(query), null);
      log.debug("Query matches: " + matches);

      if (matches.size() == 0) {
         throw new CommandException("No MBean matches for query: " + query);
      }
View Full Code Here

Examples of javax.management.MBeanServerConnection.queryNames()

            out.println(server.getMBeanCount());
            break;

         case LIST_NAMES:
            ObjectName all = new ObjectName("*:*");
            Set names = server.queryNames(all, null);
            Iterator iter = names.iterator();
            while( iter.hasNext() )
               out.println(iter.next());
            break;

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.