util
Class ObjectRefresh.RefreshTask

java.lang.Object
  extended by java.util.TimerTask
      extended by util.ObjectRefresh.RefreshTask
All Implemented Interfaces:
Runnable
Enclosing class:
ObjectRefresh

protected static class ObjectRefresh.RefreshTask
extends TimerTask

A timer tasks that runs a Refreshing instance.


Field Summary
private  Refreshing schedule
          The Refreshing instance to be scheduled.
 
Constructor Summary
protected ObjectRefresh.RefreshTask(Refreshing refresh)
          Constructs a new refresh task for the specified Refreshing instance.
 
Method Summary
 boolean equals(Object compare)
          For comparison, we consider two refresh tasks equal if they link to the same Refreshing instance.
 int hashCode()
          For putting objects in hast tables, we return the hash code of the Refreshing instance linked to this task.
 void run()
          Runs the refresh task.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schedule

private Refreshing schedule
The Refreshing instance to be scheduled.

Constructor Detail

ObjectRefresh.RefreshTask

protected ObjectRefresh.RefreshTask(Refreshing refresh)
Constructs a new refresh task for the specified Refreshing instance.

Method Detail

run

public void run()
Runs the refresh task. The Refreshing.refresh() method is called. If the Refreshing instance implements ConditionalRefreshing, the condition is checked before refreshing is commenced.

Specified by:
run in interface Runnable
Specified by:
run in class TimerTask

equals

public boolean equals(Object compare)
For comparison, we consider two refresh tasks equal if they link to the same Refreshing instance.

Overrides:
equals in class Object

hashCode

public int hashCode()
For putting objects in hast tables, we return the hash code of the Refreshing instance linked to this task.

Overrides:
hashCode in class Object