Examples of JMXClient


Examples of com.taobao.metamorphosis.tools.utils.JMXClient

        CommandLine commandLine = this.getCommandLine(args);

        String host = commandLine.getOptionValue("host", "127.0.0.1");
        int port = Integer.parseInt(commandLine.getOptionValue("port", "9999"));

        JMXClient jmxClient = JMXClient.getJMXClient(host, port);
        this.println("connected to " + jmxClient.getAddressAsString());
        ObjectInstance brokerInstance = jmxClient.queryMBeanForOne(METABROKER_NAME);

        if (brokerInstance != null) {
            jmxClient.invoke(brokerInstance.getObjectName(), "stop", new Object[0], new String[0]);
            jmxClient.close();
            this.println("invoke " + brokerInstance.getClassName() + "#stop success");
        }
        else {
            this.println("û���ҵ� " + METABROKER_NAME);
        }
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.