Package org.rhq.enterprise.server.plugin.pc

Examples of org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer


    @Override
    public List<ControlDefinition> getServerPluginControlDefinitions(PluginKey pluginKey) throws Exception {

        ServerPluginServiceMBean serverPluginService = LookupUtil.getServerPluginService();
        MasterServerPluginContainer master = serverPluginService.getMasterPluginContainer();
        if (master != null) {
            AbstractTypeServerPluginContainer pc = master.getPluginContainerByPlugin(pluginKey);
            if (pc != null) {
                ServerPluginEnvironment env = pc.getPluginManager().getPluginEnvironment(pluginKey.getPluginName());
                List<ControlDefinition> defs;
                defs = ServerPluginDescriptorMetadataParser.getControlDefinitions(env.getPluginDescriptor());
                return defs;
View Full Code Here


    @RequiredPermission(Permission.MANAGE_SETTINGS)
    public ControlResults invokeServerPluginControl(Subject subject, PluginKey pluginKey, String controlName,
        Configuration params) throws Exception {

        ServerPluginServiceMBean serverPluginService = LookupUtil.getServerPluginService();
        MasterServerPluginContainer master = serverPluginService.getMasterPluginContainer();
        if (master != null) {
            AbstractTypeServerPluginContainer pc = master.getPluginContainerByPlugin(pluginKey);
            if (pc != null) {
                ControlResults results = pc.invokePluginControl(pluginKey, controlName, params);
                return results;
            } else {
                throw new Exception("There is no known plugin named [" + pluginKey + "]. Cannot invoke [" + controlName
View Full Code Here

            ServerPluginServiceMBean mbean = LookupUtil.getServerPluginService();
            if (!mbean.isMasterPluginContainerStarted()) {
                throw new IllegalStateException("The master plugin container is not started!");
            }

            MasterServerPluginContainer master = mbean.getMasterPluginContainer();
            pc = master.getPluginContainerByClass(ContentServerPluginContainer.class);
        } catch (IllegalStateException ise) {
            throw ise;
        } catch (Exception e) {
            throw new Exception("Cannot obtain the content source plugin container", e);
        }
View Full Code Here

            ServerPluginServiceMBean mbean = LookupUtil.getServerPluginService();
            if (!mbean.isMasterPluginContainerStarted()) {
                throw new IllegalStateException("The master plugin container is not started!");
            }

            MasterServerPluginContainer master = mbean.getMasterPluginContainer();
            pc = master.getPluginContainerByClass(PackageTypeServerPluginContainer.class);
        } catch (IllegalStateException ise) {
            throw ise;
        } catch (Exception e) {
            throw new Exception("Cannot obtain the package type plugin container", e);
        }
View Full Code Here

    public void associateContentProvider(ContentSource source, ContentProvider provider) {
        providers.put(source.getId(), provider);
    }

    protected MasterServerPluginContainer createMasterPluginContainer() {
        MasterServerPluginContainer master = new TestMasterServerPluginContainer();
        MasterServerPluginContainerConfiguration config = new MasterServerPluginContainerConfiguration(tmpdir, tmpdir,
            tmpdir, null);
        master.initialize(config);
        return master;
    }
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer

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.