Examples of JolokiaDiscovery


Examples of org.jolokia.discovery.JolokiaDiscovery

            log.info("Cannot register (legacy) MBean handler for config store with name " + legacyOName + " since it already exists. " +
                     "This is the case if another agent has been already started within the same JVM. The registration is skipped.");
        }

        try {
            mBeanServerHandler.registerMBean(new JolokiaDiscovery(agentId,log),JolokiaDiscoveryMBean.OBJECT_NAME);
        } catch (InstanceAlreadyExistsException e) {
            // Ignore since there is already one registered.
            log.info("Jolokia Discovery MBean registration is skipped because there is already one registered.");
        }
    }
View Full Code Here

Examples of org.jolokia.discovery.JolokiaDiscovery

        String url = "http://localhost:8080/jolokia";
        prepareStandardInitialisation(ConfigKey.DISCOVERY_AGENT_URL.getKeyValue(), url);
        // Wait listening thread to warm up
        Thread.sleep(1000);
        try {
            JolokiaDiscovery discovery = new JolokiaDiscovery("test",LogHandler.QUIET);
            List<JSONObject> in = discovery.lookupAgentsWithTimeout(500);
            for (JSONObject json : in) {
                if (json.get("url") != null && json.get("url").equals(url)) {
                    return;
                }
            }
View Full Code Here

Examples of org.jolokia.discovery.JolokiaDiscovery

    @Test
    public void initWithAgentDiscoveryAndUrlLookup() throws ServletException, IOException {
        checkMulticastAvailable();
        prepareStandardInitialisation(ConfigKey.DISCOVERY_ENABLED.getKeyValue(), "true");
        try {
            JolokiaDiscovery discovery = new JolokiaDiscovery("test",LogHandler.QUIET);
            List<JSONObject> in = discovery.lookupAgents();
            assertTrue(in.size() > 0);
            // At least one doesnt have an URL (remove this part if a way could be found for getting
            // to the URL
            for (JSONObject json : in) {
                if (json.get("url") == null) {
View Full Code Here

Examples of org.jolokia.discovery.JolokiaDiscovery

            servlet.doGet(request, response);

            assertTrue(sw.toString().contains("used"));

            JolokiaDiscovery discovery = new JolokiaDiscovery("test",LogHandler.QUIET);
            List<JSONObject> in = discovery.lookupAgents();
            assertTrue(in.size() > 0);
            for (JSONObject json : in) {
                if (json.get("url") != null && json.get("url").equals(url)) {
                    assertTrue((Boolean) json.get("secured"));
                    return;
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.