org.logicblaze.lingo.util
Class ScheduledTask

java.lang.Object
  extended by org.logicblaze.lingo.util.ScheduledTask
All Implemented Interfaces:
java.lang.Runnable

public class ScheduledTask
extends java.lang.Object
implements java.lang.Runnable

A simple POJO which is useful for wiring together tasks in an IoC type way.

Version:
$Revision$

Constructor Summary
ScheduledTask(java.lang.Runnable task, edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService executor, long millis)
           
 
Method Summary
 long getTimeoutMillis()
           
 void run()
          Performs the task and then schedules another execution of the task.
protected  void scheduleTask()
           
 void setTimeoutMillis(long timeoutMillis)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScheduledTask

public ScheduledTask(java.lang.Runnable task,
                     edu.emory.mathcs.backport.java.util.concurrent.ScheduledExecutorService executor,
                     long millis)
Method Detail

run

public void run()
Performs the task and then schedules another execution of the task.

Specified by:
run in interface java.lang.Runnable

stop

public void stop()

getTimeoutMillis

public long getTimeoutMillis()

setTimeoutMillis

public void setTimeoutMillis(long timeoutMillis)

scheduleTask

protected void scheduleTask()


Copyright © 2011 LogicBlaze, Inc.. All Rights Reserved.