Search in sources :

Example 1 with JCommanderArgumentParser

use of com.googlecode.jmxtrans.cli.JCommanderArgumentParser 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();
}
Also used : JmxTransConfiguration(com.googlecode.jmxtrans.cli.JmxTransConfiguration) JCommanderArgumentParser(com.googlecode.jmxtrans.cli.JCommanderArgumentParser) Injector(com.google.inject.Injector) ClassLoaderEnricher(com.googlecode.jmxtrans.classloader.ClassLoaderEnricher) File(java.io.File)

Aggregations

Injector (com.google.inject.Injector)1 ClassLoaderEnricher (com.googlecode.jmxtrans.classloader.ClassLoaderEnricher)1 JCommanderArgumentParser (com.googlecode.jmxtrans.cli.JCommanderArgumentParser)1 JmxTransConfiguration (com.googlecode.jmxtrans.cli.JmxTransConfiguration)1 File (java.io.File)1