dsto.dfc.util
Class TaskDelegate

java.lang.Object
  extended by dsto.dfc.util.Scheduler.Task
      extended by dsto.dfc.util.TaskDelegate
All Implemented Interfaces:
IDelegate, Runnable

public class TaskDelegate
extends Scheduler.Task
implements IDelegate

A delegate that calls a wrapped delegate as a Task on the supplied scheduler

Author:
karunard

Field Summary
 
Fields inherited from class dsto.dfc.util.Scheduler.Task
runAt, scheduler
 
Fields inherited from interface dsto.dfc.reflection.IDelegate
EMPTY_ARGS
 
Constructor Summary
TaskDelegate(Scheduler scheduler, IDelegate delegate)
           
 
Method Summary
 void invoke(Object... args)
          Invoke the delegate with the given argument list.
 void run()
           
 String toString()
           
 
Methods inherited from class dsto.dfc.util.Scheduler.Task
dispose, scheduled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TaskDelegate

public TaskDelegate(Scheduler scheduler,
                    IDelegate delegate)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

run

public void run()
Specified by:
run in interface Runnable
Specified by:
run in class Scheduler.Task

invoke

public void invoke(Object... args)
            throws InvokeException
Description copied from interface: IDelegate
Invoke the delegate with the given argument list.

Specified by:
invoke in interface IDelegate
Parameters:
args - The arguments.
Throws:
InvokeException - if a checked exception occurs.


Copyright © 2008 Commonwealth of Australia