Package org.rhq.core.pluginapi.inventory

Examples of org.rhq.core.pluginapi.inventory.ResourceDiscoveryCallback


            boolean vetoDiscovery = false; // if true, a callback veto'ed the resource - it should not be discovered at all
            for (Map.Entry<String, List<String>> entry : callbacks.entrySet()) {
                String pluginName = entry.getKey();
                List<String> callbackClassNames = entry.getValue();
                for (String className : callbackClassNames) {
                    ResourceDiscoveryCallback callback = pluginComponentFactory.getDiscoveryCallback(pluginName,
                        className);
                    try {
                        Thread.currentThread().setContextClassLoader(callback.getClass().getClassLoader());
                        callbackResults = callback.discoveredResources(details);// inline in our calling thread - no time outs or anything; hopefully the plugin plays nice
                        callbackCount++;
                        if (log.isDebugEnabled()) {
                            log.debug("Discovery callback [{" + pluginName + "}" + className + "] returned ["
                                + callbackResults + "] #invocations=" + callbackCount);
                        }
View Full Code Here


     */
    public ResourceDiscoveryCallback getDiscoveryCallback(String pluginName, String callbackClassName)
        throws PluginContainerException {

        // same classloader as plugin discovery component would use - with null parent, its just the plugin classloader
        ResourceDiscoveryCallback callback = instantiateInDiscoveryComponentClassLoader(pluginName, callbackClassName,
            ResourceDiscoveryCallback.class);

        if (log.isDebugEnabled()) {
            log.debug("Created discovery callback [" + callbackClassName + "] for plugin [" + pluginName + ']');
        }
View Full Code Here

TOP

Related Classes of org.rhq.core.pluginapi.inventory.ResourceDiscoveryCallback

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.