use of com.googlecode.jmxtrans.cli.JmxTransConfiguration in project jmxtrans by jmxtrans.
the class ConfigurationParserTest method configureParser.
@Before
public void configureParser() {
JsonUtils jsonUtils = createInjector(new JmxTransConfiguration()).getInstance(JsonUtils.class);
configurationParser = new ConfigurationParser(jsonUtils);
}
use of com.googlecode.jmxtrans.cli.JmxTransConfiguration in project jmxtrans by jmxtrans.
the class JmxTransformerIT method startJmxTrans.
@Before
public void startJmxTrans() throws LifecycleException, URISyntaxException {
JmxTransConfiguration configuration = new JmxTransConfiguration();
configuration.setRunPeriod(1);
configuration.setJsonFile(file("integration-test.json"));
Injector injector = JmxTransModule.createInjector(configuration);
jmxTransformer = injector.getInstance(JmxTransformer.class);
jmxTransformer.start();
}
use of com.googlecode.jmxtrans.cli.JmxTransConfiguration in project jmxtrans by jmxtrans.
the class JmxTransformer method main.
public static void main(String[] args) throws Exception {
JmxTransConfiguration configuration = new JCommanderArgumentParser().parseOptions(args);
if (configuration.isHelp()) {
return;
}
ClassLoaderEnricher enricher = new ClassLoaderEnricher();
for (File jar : configuration.getAdditionalJars()) {
enricher.add(jar);
}
Injector injector = JmxTransModule.createInjector(configuration);
JmxTransformer transformer = injector.getInstance(JmxTransformer.class);
// Start the process
transformer.doMain();
}
Aggregations