context.arch.discoverer.lease
Class LeasesWatcher

java.lang.Object
  extended bycontext.arch.discoverer.lease.LeasesWatcher

public class LeasesWatcher
extends java.lang.Object

This class is used to watch for all context components leases each xx time, as defined by Lease.TIME_SLOT_MILLIS, and then send to the LeasesKeeper object an Enumeration of all component index whose lease expires.

Author:
Agathe

Field Summary
protected  LeasesKeeper keeper
          The LeasesKeeper object
protected  java.util.Vector leases
          The vector containing the lease objects
 
Constructor Summary
LeasesWatcher(LeasesKeeper leasesKeeper)
          Creates new LeasesWatcher
 
Method Summary
protected  void finalize()
          Stops the timer when this object is destroyed
protected  void putLeases(java.util.Hashtable currentLeases)
          This method allows to copy the current leases into the object the LeasesWatcher will watch.
protected  void watchLeases()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keeper

protected LeasesKeeper keeper
The LeasesKeeper object


leases

protected java.util.Vector leases
The vector containing the lease objects

Constructor Detail

LeasesWatcher

public LeasesWatcher(LeasesKeeper leasesKeeper)
Creates new LeasesWatcher

Method Detail

finalize

protected void finalize()
Stops the timer when this object is destroyed


watchLeases

protected void watchLeases()

putLeases

protected void putLeases(java.util.Hashtable currentLeases)
This method allows to copy the current leases into the object the LeasesWatcher will watch.

Parameters:
currentLeases - The vector object containing the leases