Пример #1
0
 public void fireEvent(EventType event, Object... args) {
   super.fireEvent(event, args);
   // 数据适配器事件通知
   if (null != adapters) {
     for (BaseAdaptor adapter : adapters) {
       adapter.fireEvent(event, args);
     }
   }
   // 数据读取器事件通知
   if (null != readers) {
     for (CommandFileReader reader : readers) {
       reader.fireEvent(event, args);
     }
   }
   // 临时数据读取器事件通知
   if (null != readerstmp) {
     for (CommandFileReader reader : readerstmp) {
       reader.fireEvent(event, args);
     }
   }
   // 发送监听器事件通知
   if (null != listeners) {
     for (BaseListener listener : listeners) {
       listener.fireEvent(event, args);
     }
   }
   // 状态报告
   if (null != report) {
     report.fireEvent(event, args);
   }
 }
Пример #2
0
 public void afterExec(ProcessResult result, int index) {
   super.afterExec(result, index);
   if (null != adapters) {
     // 适配处理
     for (BaseAdaptor adapter : adapters) {
       result = adapter.process(result);
     }
   }
   handler(result, index);
 }