1 package net.sf.appstatus.support.aop; 2 3 import net.sf.appstatus.core.services.IServiceManager; 4 import net.sf.appstatus.core.services.IServiceMonitor; 5 6 import org.aopalliance.intercept.MethodInvocation; 7 8 public interface IPreServiceCallback { 9 /** 10 * This method allows to create the AppStatus monitor according to the 11 * invocation. Can be used to set custom group and name. 12 * 13 * @param invocation 14 * @return The IServiceMonitor to use or null if defaults should be used. 15 */ 16 IServiceMonitor getMonitor(IServiceManager serviceManager, MethodInvocation invocation); 17 18 /** 19 * This method allows to setup the AppStatus monitor according to the 20 * invocation. Can be used to add context informations or change logger. 21 * 22 * @param monitor 23 * @param invocation 24 */ 25 void setup(IServiceMonitor monitor, MethodInvocation invocation); 26 }