Package org.rhq.core.clientapi.server.configuration

Examples of org.rhq.core.clientapi.server.configuration.ConfigurationServerService


                }
                ConfigurationUpdateResponse response = new ConfigurationUpdateResponse(
                    request.getConfigurationUpdateId(), request.getConfiguration(), ConfigurationUpdateStatus.SUCCESS,
                    null);
                // simulate agent calling into the server to complete the update
                ConfigurationServerService server = new ConfigurationServerServiceImpl();
                server.completeConfigurationUpdate(response);
            } finally {
                latch.countDown();
            }
            return;
        }
View Full Code Here


        final ScheduledExecutorService threadPool = context.mock(ScheduledExecutorService.class, "threadPool");
        configurationMgr.setThreadPool(threadPool);

        final ConfigManagement configMgmt = context.mock(ConfigManagement.class);

        final ConfigurationServerService configServerService = context.mock(ConfigurationServerService.class);

        ServerServices serverServices = new ServerServices();
        serverServices.setConfigurationServerService(configServerService);

        final UpdateResourceConfigurationRunner updateRunner = new UpdateResourceConfigurationRunner(
View Full Code Here

        Configuration result = null;
        ServerServices serverServices = this.configuration.getServerServices();

        if (serverServices != null) {
            try {
                ConfigurationServerService configServerService = serverServices.getConfigurationServerService();
                result = configServerService.persistUpdatedPluginConfiguration(resource.getId(), updatedPluginConfig);
            } catch (Exception e) {
                log.error("Failed to sync-to-Server new plugin configuration for [" + resource + "]");
            }
        } else {
            if (log.isDebugEnabled()) {
View Full Code Here

        // pass false, so we don't interrupt a plugin in the middle of a config update
        PluginContainer.shutdownExecutorService(threadPool, false);
    }

    public void updateResourceConfiguration(ConfigurationUpdateRequest request) {
        ConfigurationServerService configurationServerService = getConfigurationServerService();

        try {
            ConfigManagement configMgmt = configMgmtFactory.getStrategy(request.getResourceId());
            ResourceType resourceType = componentService.getResourceType(request.getResourceId());

            Runnable runnable = new UpdateResourceConfigurationRunner(configurationServerService, resourceType,
                configMgmt, request);
            getThreadPool().submit(runnable);
        } catch (PluginContainerException e) {
            log.error("Failed to submit config update task. Cause: " + e);

            if (configurationServerService != null) {
                ConfigurationUpdateResponse error;

                error = new ConfigurationUpdateResponse(request.getConfigurationUpdateId(), request.getConfiguration(),
                    e);

                configurationServerService.completeConfigurationUpdate(error);
            }
        }

        return;
    }
View Full Code Here

    public ConfigurationUpdateResponse executeUpdateResourceConfigurationImmediately(ConfigurationUpdateRequest request)
        throws PluginContainerException {
        ConfigurationUpdateResponse response;

        try {
            ConfigurationServerService configurationServerService = getConfigurationServerService();
            ResourceType resourceType = getResourceType(request.getResourceId());

            ConfigManagement configMgmt = new LegacyConfigManagement();
            configMgmt.setComponentService(componentService);
View Full Code Here

            ClientRemotePojoFactory factory = m_clientSender.getClientRemotePojoFactory();
            CoreServerService coreServerService = factory.getRemotePojo(CoreServerService.class);
            DiscoveryServerService discoveryServerService = factory.getRemotePojo(DiscoveryServerService.class);
            MeasurementServerService measurementServerService = factory.getRemotePojo(MeasurementServerService.class);
            OperationServerService operationServerService = factory.getRemotePojo(OperationServerService.class);
            ConfigurationServerService configurationServerService = factory
                .getRemotePojo(ConfigurationServerService.class);
            ResourceFactoryServerService resourceFactoryServerSerfice = factory
                .getRemotePojo(ResourceFactoryServerService.class);
            ContentServerService contentServerService = factory.getRemotePojo(ContentServerService.class);
            EventServerService eventServerService = factory.getRemotePojo(EventServerService.class);
View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.server.configuration.ConfigurationServerService

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.