use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class ProfileTest method turnOffSimpleCompression.
private void turnOffSimpleCompression() {
Map<String, Object> map = ImmutableMap.<String, Object>of(AgentConfigImpl.SIMPLE_COMPRESSION_PROPERTY, false);
AgentConfig agentConfig = AgentConfigImpl.createAgentConfig(map);
ConfigService configService = ConfigServiceFactory.createConfigService(agentConfig, map);
serviceManager.setConfigService(configService);
}
use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class JmxObjectFactoryTest method setUpAgent.
@Before
public void setUpAgent() {
serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
AgentConfig config = AgentConfigImpl.createAgentConfig(Collections.<String, Object>emptyMap());
ConfigService configService = ConfigServiceFactory.createConfigService(config, Collections.<String, Object>emptyMap());
serviceManager.setConfigService(configService);
serviceManager.setExtensionService(new ExtensionService(configService, ExtensionsLoadedListener.NOOP));
}
use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class JmxObjectJava6UpTest method setUpAgent.
@Before
public void setUpAgent() {
serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
AgentConfig config = AgentConfigImpl.createAgentConfig(Collections.EMPTY_MAP);
ConfigService configService = ConfigServiceFactory.createConfigService(config, Collections.EMPTY_MAP);
serviceManager.setConfigService(configService);
serviceManager.setExtensionService(new ExtensionService(configService, ExtensionsLoadedListener.NOOP));
}
use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class ProfileSamplerTest method beforeClass.
@BeforeClass
public static void beforeClass() throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
serviceManager.start();
ThreadService threadService = new ThreadService();
serviceManager.setThreadService(threadService);
Map<String, Object> map = new HashMap<>();
AgentConfig agentConfig = AgentConfigImpl.createAgentConfig(map);
ConfigService configService = ConfigServiceFactory.createConfigService(agentConfig, map);
serviceManager.setConfigService(configService);
TransactionService transactionService = new TransactionService();
serviceManager.setTransactionService(transactionService);
}
use of com.newrelic.agent.config.ConfigService in project newrelic-java-agent by newrelic.
the class ProfileSessionTest method createServiceManager.
private MockServiceManager createServiceManager(Map<String, Object> config) throws Exception {
MockServiceManager serviceManager = new MockServiceManager();
ServiceFactory.setServiceManager(serviceManager);
ThreadService threadService = new ThreadService();
serviceManager.setThreadService(threadService);
ConfigService configService = ConfigServiceFactory.createConfigService(AgentConfigImpl.createAgentConfig(config), config);
serviceManager.setConfigService(configService);
TransactionService transactionService = new TransactionService();
serviceManager.setTransactionService(transactionService);
ProfilerService profilerService = new ProfilerService();
serviceManager.setProfilerService(profilerService);
return serviceManager;
}
Aggregations