org.openprivacy.reptile.tasks
Class BaseTask

java.lang.Object
  |
  +--org.openprivacy.reptile.tasks.BaseTask
All Implemented Interfaces:
Task
Direct Known Subclasses:
FeedUpdateTask, PeerAdvertisementIndexTask, ProxyUpdateTask, SearchGCTask, SubscriptionProxyUpdateTask

public abstract class BaseTask
extends java.lang.Object
implements Task

Responsible for updating Reptile subscriptions with the Proxy mechanism.

Version:
$Id: BaseTask.java,v 1.7 2002/03/09 22:52:24 burton Exp $
Author:
burtonator

Field Summary
 
Fields inherited from interface org.openprivacy.reptile.tasks.Task
MESSAGE_SUCCESSFUL, STATE_FAILED, STATE_PAUSED, STATE_RUNNING, STATE_STOPPED, TYPE_OCS, TYPE_RSS, TYPE_UNKNOWN
 
Constructor Summary
BaseTask()
           
 
Method Summary
 java.lang.String getIdentifier()
          Get the value of identifier.
 long getInterval()
          Get the value of interval.
 java.lang.String getLastMessage()
          Get the value of lastMessage.
 long getLastRan()
          Get the value of lastRan.
 java.lang.String getState()
          Get the value of state.
 java.lang.String getType()
          Get the value of type.
 boolean isRunning()
          Return true if this task is running.
protected  boolean requireNotStale(java.lang.String location)
          Perform a test to make sure the content is not stale, if it is (and testing for this is enabled), we return true.
 void setIdentifier(java.lang.String identifier)
          Set the value of identifier.
 void setInterval(long interval)
          Set the value of interval.
 void setLastMessage(java.lang.String lastMessage)
          Set the value of lastMessage.
 void setLastMessage(java.lang.Throwable t)
          Set the value of lastMessage.
 void setLastRan(long lastRan)
          Set the value of lastRan.
 void setState(java.lang.String state)
          Set the value of state.
 void setType(java.lang.String type)
          Set the value of type.
protected  boolean stale(org.openprivacy.panther.components.ProxyEntry entry)
          When compared to the current threads interval...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openprivacy.reptile.tasks.Task
run
 

Constructor Detail

BaseTask

public BaseTask()
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Get the value of identifier.

Specified by:
getIdentifier in interface Task

setIdentifier

public void setIdentifier(java.lang.String identifier)
Set the value of identifier.

Specified by:
setIdentifier in interface Task
See Also:
Task.getIdentifier()

getLastRan

public long getLastRan()
Get the value of lastRan.

Specified by:
getLastRan in interface Task

setLastRan

public void setLastRan(long lastRan)
Set the value of lastRan.

Specified by:
setLastRan in interface Task

getInterval

public long getInterval()
Get the value of interval.

Specified by:
getInterval in interface Task

setInterval

public void setInterval(long interval)
Set the value of interval.

Specified by:
setInterval in interface Task
See Also:
Task.getInterval()

setLastMessage

public void setLastMessage(java.lang.String lastMessage)
Set the value of lastMessage.

Specified by:
setLastMessage in interface Task
See Also:
Task.getLastMessage()

setLastMessage

public void setLastMessage(java.lang.Throwable t)
Set the value of lastMessage.

Specified by:
setLastMessage in interface Task
See Also:
Task.getLastMessage()

getLastMessage

public java.lang.String getLastMessage()
Get the value of lastMessage.

Specified by:
getLastMessage in interface Task

getState

public java.lang.String getState()
Get the value of state.

Specified by:
getState in interface Task

setState

public void setState(java.lang.String state)
Set the value of state.

Specified by:
setState in interface Task
See Also:
setState

setType

public void setType(java.lang.String type)
Set the value of type.

Specified by:
setType in interface Task

getType

public java.lang.String getType()
Get the value of type.

Specified by:
getType in interface Task

isRunning

public boolean isRunning()
Description copied from interface: Task
Return true if this task is running.

Specified by:
isRunning in interface Task
See Also:
Task.isRunning()

stale

protected boolean stale(org.openprivacy.panther.components.ProxyEntry entry)
When compared to the current threads interval... and current time. Retrn true if this proxy entry is stale.


requireNotStale

protected boolean requireNotStale(java.lang.String location)
Perform a test to make sure the content is not stale, if it is (and testing for this is enabled), we return true.