1 package dst.ass2.aop.sample;
3 import org.springframework.aop.support.AopUtils;
5 import dst.ass2.aop.IPluginExecutable;
6 import dst.ass2.aop.event.EventBus;
7 import dst.ass2.aop.event.EventType;
9 public abstract class AbstractPluginExecutable implements IPluginExecutable {
11 public void execute() {
12 EventBus eventBus = EventBus.getInstance();
13 eventBus.add(EventType.PLUGIN_START, this, AopUtils.getTargetClass(this).getSimpleName() + " is executed!");
17 } catch (InterruptedException e) {
18 // Should not happen but is not critical so the stack trace is printed to grab some attention ;-)
22 eventBus.add(EventType.PLUGIN_END, this, AopUtils.getTargetClass(this).getSimpleName() + " is finished!");
26 public void interrupted() {