eventmanager.java

来自「jtapi for telephone」· Java 代码 · 共 36 行

JAVA
36
字号
package net.sourceforge.gjtapi.util;
/**
 * This is a queue that accepts objects manages a collection of event handlers.
 * A user will create and instance of the EventHandler and pass it into this event collector.
 * Subclasses include an Ordered and Parallel version.
 * Creation date: (2000-02-24 17:01:26)
 * @author: Richard Deadman
 */
public abstract class EventManager extends BlockManager {
	protected EventHandler handler;			// shared handler for the handler threads
/**
 * Create myself with a event handler delegate
 * Creation date: (2000-02-25 7:26:06)
 * @author: Richard Deadman
 * @param eh com.uforce.util.EventHandler
 * @param exh A handler for RuntimeEvents from eh.process() RuntimeExceptions.
 */
public EventManager(EventHandler eh, ExceptionHandler exh) {
	super(exh);
	
	// record this first thread as a template for others
	this.handler = eh;

}
/**
 * Add a new object to the queue.  If anyone is waiting for objects they are activated.
 * This opens the access rights to the base put method.
 * Creation date: (2000-02-24 17:05:21)
 * @author: Richard Deadman
 * @param o The object to add
 */
public void put(Object o) {
	super.put(o);
}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?