org.globus.mds.usefulrp.rpprovider
Class ResourcePropertyProviderTask

java.lang.Object
  extended byorg.globus.mds.usefulrp.rpprovider.ResourcePropertyProviderTask
All Implemented Interfaces:
commonj.timers.TimerListener

public class ResourcePropertyProviderTask
extends Object
implements commonj.timers.TimerListener

A TimerListener implementation for executing timer tasks that periodically populate the values of a BaseResourcePropertyProvider derived class. This class performs the following actions when the timer event is fired:

1. Invokes the ResourcePropertyElementProducer.getElement method of the ResourcePropertyElementProducer class specified in the ResourcePropertyElementProducerConfig parameter.

2. Invokes the ResourcePropertyProviderListener.executionPerformed method of the instance of the Java class specified by the ResourcePropertyProviderListener parameter, passing the result of the previous invocation of the ResourcePropertyElementProducer.getElement() method to the appropriate ResourcePropertyProviderListener class.

Note: If any errors or exceptions occur during execution, the default behavior of this timer task will be to cancel itself. This behavior can be overridden by setting the cancelOnErrors parameter to false at object construction time.


Constructor Summary
ResourcePropertyProviderTask(ResourcePropertyElementProducerConfig config, ResourcePropertyProviderListener listener)
          Creates a new instance of ResourcePropertyProviderTask
ResourcePropertyProviderTask(ResourcePropertyElementProducerConfig config, ResourcePropertyProviderListener listener, boolean cancelOnErrors)
          Creates a new instance of ResourcePropertyProviderTask
 
Method Summary
 commonj.timers.Timer getTimer()
           
protected  void initialize()
           
 void setTimer(commonj.timers.Timer t)
           
 void timerExpired(commonj.timers.Timer timer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcePropertyProviderTask

public ResourcePropertyProviderTask(ResourcePropertyElementProducerConfig config,
                                    ResourcePropertyProviderListener listener)
                             throws Exception
Creates a new instance of ResourcePropertyProviderTask

Parameters:
config - an instance of ResourcePropertyElementProducerConfig that contains the configuration information for this task.
listener - an instance of ResourcePropertyProviderListener that will process the results from the execution of the ResourcePropertyElementProducer.

ResourcePropertyProviderTask

public ResourcePropertyProviderTask(ResourcePropertyElementProducerConfig config,
                                    ResourcePropertyProviderListener listener,
                                    boolean cancelOnErrors)
                             throws Exception
Creates a new instance of ResourcePropertyProviderTask

Parameters:
config - an instance of ResourcePropertyElementProducerConfig that contains the configuration information for this task.
listener - an instance of ResourcePropertyProviderListener that will process the results from the execution of the ResourcePropertyElementProducer.
cancelOnErrors - a boolean value indicating that the task should automatically be cancelled if any processing errors occur. Defaults to true.
Method Detail

initialize

protected void initialize()
                   throws Exception
Throws:
Exception

setTimer

public void setTimer(commonj.timers.Timer t)

getTimer

public commonj.timers.Timer getTimer()

timerExpired

public void timerExpired(commonj.timers.Timer timer)
Specified by:
timerExpired in interface commonj.timers.TimerListener


Copyright © 1999-2006 University of Chicago. All rights reserved.