01: /* EventProcessingThread.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Tue Feb 13 09:23:49 2007, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zk.ui.sys;
20:
21: import org.zkoss.zk.ui.Component;
22: import org.zkoss.zk.ui.event.Event;
23:
24: /**
25: * Represents an event processing thread.
26: *
27: * @author tomyeh
28: */
29: public interface EventProcessingThread {
30: /** Returns whether it is ceased.
31: *
32: * <p>The event processing is ceased automatically.
33: * If you want to cease it manually, you can invoke
34: * {@link DesktopCtrl#ceaseSuspendedThread}.
35: */
36: public boolean isCeased();
37:
38: /** Returns whether it is suspended.
39: *
40: * @see DesktopCtrl#getSuspendedThreads
41: * @see DesktopCtrl#ceaseSuspendedThread
42: */
43: public boolean isSuspended();
44:
45: /** Returns whether this thread is idle, i.e., not processing any event.
46: */
47: public boolean isIdle();
48:
49: /** Returns the event being processed by this thread, or null if idle.
50: */
51: public Event getEvent();
52:
53: /** Returns the component being processed by this thread, or null if idle.
54: */
55: public Component getComponent();
56:
57: /** Sends the specified component and event and processes the event
58: * synchronously.
59: * Used to implements {@link org.zkoss.zk.ui.event.Events#sendEvent}.
60: * @since 3.0.2
61: */
62: public void sendEvent(Component comp, Event event) throws Exception;
63: }
|