Interface EventThreadCleanup


public interface EventThreadCleanup
Used to clean the event processing thread.

How this interface is used.

  1. First, you specify a class that implements this interface in WEB-INF/zk.xml as a listener.
  2. Then, an instance of the specified class is constructed and cleanup(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.event.Event, java.util.List<java.lang.Throwable>) is invoked when the event processing thread has processed an event, and then complete(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.event.Event) of the same instance is called in the servlet thread.

Thus, the typical use is to cleanup un-closed transactions when cleanup(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.event.Event, java.util.List<java.lang.Throwable>) is called.

Author:
tomyeh
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cleanup(Component comp, Event evt, List<Throwable> errs)
    Cleans up the event processing thread.
    void
    complete(Component comp, Event evt)
    Called in the serlvet thread to clean up.