Package org.rhq.enterprise.client

Examples of org.rhq.enterprise.client.LocalClient


        HashSet<RhqManager> expected = new HashSet<RhqManager>(Arrays.asList(RhqManager.values()));
        if (!RhqManager.TagManager.enabled()) {
            expected.remove(RhqManager.TagManager);
        }

        LocalClient lc = new LocalClient(null);
        assertEquals(lc.getScriptingAPI().keySet(), expected,
            "Scripting API contains different managers than expected.");
    }
View Full Code Here


        try {
            ClassLoader differentCl = new URLClassLoader(new URL[0], getClass().getClassLoader());

            Thread.currentThread().setContextClassLoader(differentCl);

            LocalClient lc = new LocalClient(null);

            //this call creates the proxy and is theoretically prone to the context classloader
            Object am = lc.getScriptingAPI().get(RhqManager.AlertManager);

            //check that only the simplified method exists on the returned object
            try {
                am.getClass().getMethod("deleteAlerts", new Class<?>[] { Subject.class, int[].class });
                Assert.fail("The original remote interface method should not be available on the scripting API proxy.");
View Full Code Here

    private static ScriptEngine getScriptEngine(Alert alert, PrintWriter output, Config config, String language,
        Set<String> domainPackagesNames) throws ScriptException, IOException, InterruptedException {
        Subject user = config.subject;

        LocalClient client = new LocalClient(user);

        StandardBindings bindings = new StandardBindings(output, client);
        bindings.put("alert", alert);

        ScriptEngine engine = takeEngine(bindings, language, domainPackagesNames);
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.client.LocalClient

Copyright © 2018 www.massapicom. 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.