org.jgroups.util
Class ImmediateTask

java.lang.Object
  extended by org.jgroups.util.ImmediateTask
All Implemented Interfaces:
TimeScheduler.Task

public class ImmediateTask
extends java.lang.Object
implements TimeScheduler.Task

Task which is executed immediately and only one time

Version:
$Id: ImmediateTask.java,v 1.1 2006/09/04 07:33:25 belaban Exp $
Author:
Bela Ban

Constructor Summary
ImmediateTask(java.lang.Runnable r)
           
 
Method Summary
 boolean cancelled()
           
 long nextInterval()
           
 void run()
          Execute the task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmediateTask

public ImmediateTask(java.lang.Runnable r)
Method Detail

cancelled

public boolean cancelled()
Specified by:
cancelled in interface TimeScheduler.Task
Returns:
true if task is cancelled and shouldn't be scheduled again

nextInterval

public long nextInterval()
Specified by:
nextInterval in interface TimeScheduler.Task
Returns:
the next schedule interval

run

public void run()
Description copied from interface: TimeScheduler.Task
Execute the task

Specified by:
run in interface TimeScheduler.Task


Copyright ? 1998-2006 Bela Ban. All Rights Reserved.