Search in sources :

Example 6 with RemoteConfigurationManager

use of com.axway.ats.agent.webapp.client.configuration.RemoteConfigurationManager in project ats-framework by Axway.

the class EnvironmentCleanupClient method pushConfiguration.

/**
     * Apply the new settings
     *
     * @param agentSettings a list with Agent settings to change
     * @throws AgentException
     */
private void pushConfiguration(Configurator configurator) throws AgentException {
    List<Configurator> configurators = new ArrayList<Configurator>();
    configurators.add(configurator);
    if (atsAgent.equals(LOCAL_JVM)) {
        // the already loaded Agent components are first unloaded
        MainComponentLoader.getInstance().destroy();
        // the initialization procedure implicitly applies the new configurations and then loads up again the Agent components
        MainComponentLoader.getInstance().initialize(configurators);
    } else {
        // send the Agent configuration
        new RemoteConfigurationManager().pushConfiguration(atsAgent, configurator);
    }
}
Also used : Configurator(com.axway.ats.agent.core.configuration.Configurator) EnvironmentConfigurator(com.axway.ats.agent.core.configuration.EnvironmentConfigurator) ArrayList(java.util.ArrayList) RemoteConfigurationManager(com.axway.ats.agent.webapp.client.configuration.RemoteConfigurationManager)

Aggregations

RemoteConfigurationManager (com.axway.ats.agent.webapp.client.configuration.RemoteConfigurationManager)6 RemoteLoggingConfigurator (com.axway.ats.agent.core.configuration.RemoteLoggingConfigurator)5 Test (org.junit.Test)3 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)3 Configurator (com.axway.ats.agent.core.configuration.Configurator)2 AgentException (com.axway.ats.agent.core.exceptions.AgentException)2 AgentException_Exception (com.axway.ats.agent.webapp.client.AgentException_Exception)2 ArrayList (java.util.ArrayList)2 AgentConfigurator (com.axway.ats.agent.core.configuration.AgentConfigurator)1 EnvironmentConfigurator (com.axway.ats.agent.core.configuration.EnvironmentConfigurator)1 GenericAgentConfigurator (com.axway.ats.agent.core.configuration.GenericAgentConfigurator)1 AgentService (com.axway.ats.agent.webapp.client.AgentService)1