注意:无论在异步事件分发过程中是否发生异常,该方法都会如期的被执行。
178179180181182183184185186187188
try { listener.onEvent(eventType, objects); } catch (Throwable e) { callBack.handleException(eventType, objects, e); } finally { callBack.handleComplete(eventType, objects); } } } // //2.处理Once事务.
194195196197198199200201202203204
try { listener.onEvent(eventType, objects); } catch (Throwable e) { callBack.handleException(eventType, objects, e); } finally { callBack.handleComplete(eventType, objects); } } } this.onceListenerLock.unlock();//解锁 };