Filter.doMethodFilter(int, String, String[], String[], String[])被调用的时候,
一定是Filter.doClassFilter(int, String, String, String[], String[])上一次返回true的调用。ProcessControlException.throwReturnImmediately(Object)
所引起的返回事件ProcessControlException.throwThrowsImmediately(Throwable)
所引起的异常抛出事件EventListener将开始收到对应的事件
这里抛出异常将会是阻止模块被激活的唯一方式
事件流转流程
+-------+
| |
+========+ <return> +========+ | <return immediately>
| | <return immediately> | | |
| BEFORE |---------------------->| RETURN |<---+
| | | |
+========+ +========+
| | ^
| <throws immediately> | |
| | | <return immediately>
| v |
| +========+
| | |
+--------------------------->| THROWS |<---+
<throws> | | |
<throws immediately> +========+ | <throws immediately>
| |
+-------+
EventListener将被静默,无法收到对应的事件。Printer.broken()之后,再次调用本方法将无法阻塞当前线程
有两种场景会打断本次挂起,任何以下场景都能结束并唤醒当前被阻塞的线程
网络I/O被中断
Printer.broken()被调用
Thread.interrupt()被调用
Printer.waitingForBroken()ModuleEventWatcher.watch(Filter, EventListener, Progress, Event.Type...)不一样的地方是,当观察结束时会自动delete观察事件
还原之前观察时被渲染的代码
ModuleEventWatcher.watch(Filter, EventListener, Progress, Event.Type...)不一样的地方是,当观察结束时会自动delete观察事件
还原之前观察时被渲染的代码
Copyright © 2017. All rights reserved.