Examples of PluginContainerException


Examples of org.rhq.core.clientapi.agent.PluginContainerException

    private final KeyTypePlugin resourceKeyTypePlugin;
    private final List<KeyTypePlugin> ancestorKeyTypePlugins;

    public CanonicalResourceKey(Resource resource, Resource parent) throws PluginContainerException {
        if (resource == null) {
            throw new PluginContainerException("resource must not be null");
        }
        if (parent == null) {
            throw new PluginContainerException("parent must not be null");
        }

        this.resourceKeyTypePlugin = new KeyTypePlugin(resource.getResourceKey(), resource.getResourceType());

        this.ancestorKeyTypePlugins = new ArrayList<KeyTypePlugin>(5);
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

        public final String type;
        public final String plugin;

        KeyTypePlugin(String key, ResourceType type) throws PluginContainerException {
            if (key == null) {
                throw new PluginContainerException("key must not be null");
            }
            if (type == null) {
                throw new PluginContainerException("type must not be null");
            }
            if (type.getName() == null) {
                throw new PluginContainerException("type name must not be null");
            }
            if (type.getPlugin() == null) {
                throw new PluginContainerException("plugin must not be null");
            }
            this.key = key.intern();
            this.type = type.getName().intern();
            this.plugin = type.getPlugin().intern();
        }
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

     */
    public synchronized ClassLoader obtainResourceClassLoader(Resource resource, ResourceContainer parent,
        List<URL> additionalJars) throws PluginContainerException {

        if (resource == null) {
            throw new PluginContainerException("resource must not be null");
        }
        if (parent == null) {
            throw new PluginContainerException("parent must not be null");
        }

        CanonicalResourceKey mapKey = new CanonicalResourceKey(resource, parent.getResource());
        ClassLoader resourceCL = this.resourceClassLoaders.get(mapKey);
        if (resourceCL == null) {
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

            // This is the proxy that will look like the discovery component object that the caller will use.
            T proxy = (T) Proxy.newProxyInstance(pluginClassLoader, new Class<?>[] { componentInterface }, handler);
            return proxy;

        } catch (Throwable t) {
            throw new PluginContainerException("Cannot get discovery component proxy for [" + component + "]", t);
        }
    }
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

            runner = new UpdateResourceConfigurationRunner(configurationServerService, resourceType, configMgmt,
                request);

            response = getThreadPool().submit(runner).get();
        } catch (Exception e) {
            throw new PluginContainerException("Error occurred in delete resource thread", e);
        }

        return response;
    }
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

        Configuration configuration;

        try {
            configuration = loadConfig.executeLoad(resourceId);
        } catch (Throwable t) {
            throw new PluginContainerException(createErrorMsg(resourceId, "An exception was thrown."), t);
        }

        if (configuration == null) {
            throw new PluginContainerException(createErrorMsg(resourceId, "returned a null Configuration."));
        }

        return configuration;
    }
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

            try {
                facet.validateStructuredConfiguration(configuration);
            } catch (IllegalArgumentException e) {
                success = false;
            } catch (Throwable t) {
                throw new PluginContainerException(t.getMessage(), t);
            }
        } else {
            for (RawConfiguration rawConfiguration : configuration.getRawConfigurations()) {
                try {
                    facet.validateRawConfiguration(rawConfiguration);
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

    public ContentDiscoveryReport executeResourcePackageDiscoveryImmediately(int resourceId, String packageTypeName)
        throws PluginContainerException {
        // Load the package type object
        PackageType packageType = findPackageType(resourceId, packageTypeName);
        if (packageType == null) {
            throw new PluginContainerException("Could not load package type [" + packageTypeName + "] for resource: "
                + resourceId);
        }

        // Create a new runner that is scoped to the resource/package type specified
        ScheduledContentDiscoveryInfo discoveryInfo = new ScheduledContentDiscoveryInfo(resourceId, packageType);

        ContentDiscoveryRunner oneTimeRunner = new ContentDiscoveryRunner(this, discoveryInfo);

        ContentDiscoveryReport results;
        try {
            results = discoveryThreadPoolExecutor.submit((Callable<ContentDiscoveryReport>) oneTimeRunner).get();
        } catch (Exception e) {
            throw new PluginContainerException("Exception occurred during execution of discovery", e);
        }

        return results;
    }
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

        throws PluginContainerException {
        Callable<DeployPackagesResponse> runner = new CreateContentRunner(this, request);
        try {
            return crudExecutor.submit(runner).get();
        } catch (Exception e) {
            throw new PluginContainerException("Error during deployment of packages. request: " + request, e);
        }
    }
View Full Code Here

Examples of org.rhq.core.clientapi.agent.PluginContainerException

        List<DeployPackageStep> steps;
        try {
            ContentFacet contentFacet = findContentFacet(resourceId);
            steps = contentFacet.generateInstallationSteps(packageDetails);
        } catch (Exception e) {
            throw new PluginContainerException("Error translating the package installation steps", e);
        }

        return steps;
    }
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.