org.globus.mds.usefulrp
Class GLUEResourceProperty.PeriodicExecutor

java.lang.Object
  extended byorg.globus.mds.usefulrp.GLUEResourceProperty.PeriodicExecutor
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
GLUEResourceProperty

class GLUEResourceProperty.PeriodicExecutor
extends java.lang.Object
implements java.lang.Runnable

This class will periodically execute a specified script. TODO: Periodic execution will be started automatically by the constructor.


Field Summary
(package private)  GLUEResourceProperty.Listener callback
          callback to be made to deliver
(package private)  java.lang.Class cl
          the output of the producer will be deserialised to an instance of this class.
(package private)  int period
          number of seconds to wait after one execution has finished before starting the subsequent execution.
private  int refresherThreadNumber
          counter to use for numbering in the names of the refresher threads
(package private)  java.lang.String scriptName
          Defines the type and name of the script to run.
(package private)  java.lang.Thread thread
           
 
Constructor Summary
(package private) GLUEResourceProperty.PeriodicExecutor(java.lang.String s, java.lang.Class c, GLUEResourceProperty.Listener l, int p)
           
 
Method Summary
 void run()
           
private  void runScript()
          Executes the configured provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scriptName

java.lang.String scriptName
Defines the type and name of the script to run. The type is determined by the first word of the parameter, which make take the following values:


cl

java.lang.Class cl
the output of the producer will be deserialised to an instance of this class.


callback

GLUEResourceProperty.Listener callback
callback to be made to deliver


period

int period
number of seconds to wait after one execution has finished before starting the subsequent execution. Note that this means that the period between the start of one execution and the start of the next will be greater than this period.


thread

java.lang.Thread thread

refresherThreadNumber

private int refresherThreadNumber
counter to use for numbering in the names of the refresher threads

Constructor Detail

GLUEResourceProperty.PeriodicExecutor

GLUEResourceProperty.PeriodicExecutor(java.lang.String s,
                                      java.lang.Class c,
                                      GLUEResourceProperty.Listener l,
                                      int p)
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable

runScript

private void runScript()
Executes the configured provider. Tf the execution is successful, a deserialised object of class cl will be passed to the listener callback.