java.lang.Object
LeaseRenewalManager
com.fetish.toolkit.FetishLeaseRenewalManager
- public class FetishLeaseRenewalManager
- extends LeaseRenewalManager
The Fetish Lease Renewal Manager.
This class takes care of renewing the service registration leases
in time, and in case of lease cancellation by late arrival of renewal
request, it reregisters the expired service proxy by calling the
reregister method in the FetishImpl class.
|
Method Summary |
void |
cancel(Lease lease)
Cancel the lease. |
void |
remove(Lease lease)
Remove the lease from the registry. |
void |
renewFor(Lease lease,
ServiceID sid,
java.lang.String url)
Starts the automatic renewal of the lease. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lease
private Lease lease
expiration
private long expiration
delay
private long delay
t
private java.lang.Thread t
tree
private java.util.TreeMap tree
defaultExpiration
private static long defaultExpiration
handback
private FetishImpl handback
FetishLeaseRenewalManager
public FetishLeaseRenewalManager(FetishImpl handback)
- Constructor.
Takes a FetishImpl instance as a parameter, to achieve reregistration
of expired services.
renewFor
public void renewFor(Lease lease,
ServiceID sid,
java.lang.String url)
- Starts the automatic renewal of the lease.
The lease associated with the ServiceID sid obtained from the
registration of a service in the FADA pointed by the url will be
renewed until one of these two cases happen:
- The lease is cancelled - The lease is dropped from the
internal registry
- The lease expires because lease renewal is late - The service
identified by sid in the FADA identified by url will be reregistered.
However, the lease has already been lost, but the reregister method will
add a new entry in the registry by calling this method
cancel
public void cancel(Lease lease)
- Cancel the lease.
The lease is cancelled, causing the dropping of the associated
service, and it is removed from the internal registry.
remove
public void remove(Lease lease)
- Remove the lease from the registry.
This method is identical to cancel(). It causes the removal of the
lease from the internal registry, and also cancels it.