workertask.java

来自「j2me平台下开发的RSS阅读器」· Java 代码 · 共 24 行

JAVA
24
字号
package util;

/**
 * <code>WorkerTask</code> is implemented by tasks that can be run
 * by a <code>Worker</code>.
 *
 * @author Jonathan Knudsen
 */
public interface WorkerTask {
  /**
   * This method is called from within the
   * <code>Worker</code>'s thread. Note that this method,
   * in constrast to <code>java.lang.Runnable</code>'s
   * <code>run()</code>method, may throw an exception.
   */
  public void run() throws Exception;
  
  /**
   * This method may be called at any time. It is the task's
   * responsibility to terminate gracefully.
   */
  public void cancel();
}

⌨️ 快捷键说明

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