Package org.zkoss.zk.ui.util
Interface ExecutionMonitor
public interface ExecutionMonitor
An application-level listener to know when an execution is activated,
deactivated, or waiting for activation.
In addition, it also monitors the processing of an event, such that
it can be used to monitor the performance of the processing of events
(while
PerformanceMeter monitors the AU requests).
Notice that the same listener is used for the whole application. Make sure it is thread-safe and the performance is good. In additions, don't throw any exception, and don't hold a reference to execution.
If you hold references to desktops, remember to clean them up
when desktopDestroy(org.zkoss.zk.ui.Desktop) is called.
- Since:
- 6.0.0
- Author:
- tomyeh
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoiddesktopDestroy(Desktop desktop) Called when a desktop is destroyed.voideventComplete(Event event) Called when the processing of the given event completes.voideventResume(Event event) Called when the processing of the given event resumes.voideventStart(Event event) Called when the processing of the given event starts.voideventSuspend(Event event) Called when the processing of the given event suspends.voidexecutionAbort(Execution exec, Desktop desktop, Throwable t) Called when the activation of the given execution is aborted.voidexecutionActivate(Execution exec, Desktop desktop) Called when an execution is activated.voidexecutionDeactivate(Execution exec, Desktop desktop) Called when an activated execution completes and is deactivated.voidexecutionWait(Execution exec, Desktop desktop) Called when an execution fails to activate and then being waiting for activation.
-
Method Details
-
executionActivate
Called when an execution is activated. There is only one execution per desktop is allowed to activate at the same time. -
executionWait
Called when an execution fails to activate and then being waiting for activation.Since 5.0, the AU requests are blocked at the client if ZK is busy for processing an AU request. Thus, this method is rarely called.
-
executionDeactivate
Called when an activated execution completes and is deactivated. -
executionAbort
Called when the activation of the given execution is aborted.- Parameters:
t- the exception causing the abort, or null if it is aborted normally.
-
desktopDestroy
Called when a desktop is destroyed. This callback is useful to clean up the memory, if you have references to desktops. -
eventStart
Called when the processing of the given event starts. The execution can be found byExecutions.getCurrent(). -
eventComplete
Called when the processing of the given event completes. The execution can be found byExecutions.getCurrent(). -
eventSuspend
Called when the processing of the given event suspends. The execution can be found byExecutions.getCurrent(). -
eventResume
Called when the processing of the given event resumes. The execution can be found byExecutions.getCurrent().
-