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 (whilePerformanceMeter
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:
PerformanceMeter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
desktopDestroy(Desktop desktop)
Called when a desktop is destroyed.void
eventComplete(Event event)
Called when the processing of the given event completes.void
eventResume(Event event)
Called when the processing of the given event resumes.void
eventStart(Event event)
Called when the processing of the given event starts.void
eventSuspend(Event event)
Called when the processing of the given event suspends.void
executionAbort(Execution exec, Desktop desktop, java.lang.Throwable t)
Called when the activation of the given execution is aborted.void
executionActivate(Execution exec, Desktop desktop)
Called when an execution is activated.void
executionDeactivate(Execution exec, Desktop desktop)
Called when an activated execution completes and is deactivated.void
executionWait(Execution exec, Desktop desktop)
Called when an execution fails to activate and then being waiting for activation.
-
-
-
Method Detail
-
executionActivate
void executionActivate(Execution exec, Desktop desktop)
Called when an execution is activated. There is only one execution per desktop is allowed to activate at the same time.
-
executionWait
void executionWait(Execution exec, Desktop desktop)
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
void executionDeactivate(Execution exec, Desktop desktop)
Called when an activated execution completes and is deactivated.
-
executionAbort
void executionAbort(Execution exec, Desktop desktop, java.lang.Throwable t)
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
void desktopDestroy(Desktop desktop)
Called when a desktop is destroyed. This callback is useful to clean up the memory, if you have references to desktops.
-
eventStart
void eventStart(Event event)
Called when the processing of the given event starts. The execution can be found byExecutions.getCurrent()
.
-
eventComplete
void eventComplete(Event event)
Called when the processing of the given event completes. The execution can be found byExecutions.getCurrent()
.
-
eventSuspend
void eventSuspend(Event event)
Called when the processing of the given event suspends. The execution can be found byExecutions.getCurrent()
.
-
eventResume
void eventResume(Event event)
Called when the processing of the given event resumes. The execution can be found byExecutions.getCurrent()
.
-
-