All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stevesouza.jamon.JamonHelloWorld Maven / Gradle / Ivy

Go to download

This pom simply has an unwoven HelloWorld class, that also registers jamon as jmx so users can see automon and jamon integration. The resulting jar can be used to test AspectJ load time weaving.

There is a newer version: 2.0.0
Show newest version
package com.stevesouza.jamon;

import com.jamonapi.JamonPropertiesLoader;
import com.jamonapi.MonitorFactory;
import com.jamonapi.jmx.JmxUtils;
import com.stevesouza.helloworld.HelloWorld;

/**
 * Created by stevesouza on 2/13/15.
 */
public class JamonHelloWorld extends HelloWorld {

    public JamonHelloWorld() throws Exception {
        /** Init jamon */
        JamonPropertiesLoader loader = new JamonPropertiesLoader();
        MonitorFactory.addListeners(loader.getListeners());
        JmxUtils.registerMbeans();
    }

    public String hiSteve() {
        return "hi steve";
    }

    public static void main(String[] args) throws Exception {
        JamonHelloWorld helloWorld = new JamonHelloWorld();
        System.out.println(helloWorld.hiSteve());
        helloWorld.run(args);
        System.out.println(MonitorFactory.getReport());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy