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

scouter.server.plugin.builtin.PluginInvocation Maven / Gradle / Ivy

There is a newer version: 2.20.0
Show newest version
package scouter.server.plugin.builtin;

import scouter.lang.pack.Pack;
import scouter.server.Configure;
import scouter.server.Logger;

import java.lang.reflect.Method;

/**
 * @author Gun Lee ([email protected]) on 2016. 3. 19.
 */
public class PluginInvocation {
    Object object;
    Method method;

    public PluginInvocation(Object object, Method method) {
        this.object = object;
        this.method = method;
    }
    public void process(Pack pack) {
        try {
            method.invoke(object, pack);
        } catch (Throwable t) {
            Logger.println("G003", "[Plugin invoke fail]" + object.getClass() + " " + method + " " + t);
            if(Configure.getInstance()._trace) {
                t.printStackTrace();
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy