worktask.java

来自「RESIN 3.2 最新源码」· Java 代码 · 共 43 行

JAVA
43
字号
package example;import java.util.logging.Logger;import java.util.logging.Level;import javax.resource.spi.work.Work;/** * Implements the work task.  This task just loops until the resource stops. */public class WorkTask implements Work {  private static final Logger log =    Logger.getLogger(WorkTask.class.getName());  private TimerResource _resource;  /**   * Creates the work task.   */  WorkTask(TimerResource resource)  {    _resource = resource;  }  /**   * The method called to execute the task, like Runnable   */  public void run()  {    log.fine("work starting");          _resource.addCount();  }  /**   * Resin will call the release() method when the server shuts down   * to tell the task to close.   */  public void release()  {  }}

⌨️ 快捷键说明

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