net.jini.lease
Interface LeaseListener
- public abstract interface LeaseListener
- extends java.util.EventListener
With respect to an entity that uses the LeaseRenewalManager
to manage leases granted to the entity, this interface defines the
mechanism through which the entity receives notification that the
LeaseRenewalManager
has failed to renew one of the leases.
Such renewal failures typically occur because of one of the following
conditions:
- the expiration time of the lease has been reached, and the lease
has already expired, before the renewal request can be made
- the renewal request has been denied by the lease grantor for
some reason, even though the desired absolute expiration time
of the lease has not yet been reached
- the renewal request could not be completed before the expiration
of the lease
It is the responsibility of the entity to register with the
LeaseRenewalManager
, a reference to an object that
implements this interface. That object should define the actions to
take upon receipt of such notifications. Then, when one of the above
conditions occurs, the LeaseRenewalManager
will send an
instance of the LeaseRenewalEvent
class to that listener
object. Note that prior to sending the event, the
LeaseRenewalManager
will remove the affected lease from
its managed set of leases.
- See Also:
net.jini.core.Lease
,
LeaseRenewalManager
,
LeaseRenewalEvent
Method Summary |
void |
notify(LeaseRenewalEvent e)
Called by the LeaseRenewalManager when it fails to
renew a lease because: the expiration time of the lease has been
reached (and the lease has already expired) before the renewal
request can be made; the renewal request has been denied by the
lease grantor, even even though the desired absolute expiration time
of the lease has not yet been reached; or the renewal request could
not be completed before the expiration of the lease. |
notify
public void notify(LeaseRenewalEvent e)
- Called by the
LeaseRenewalManager
when it fails to
renew a lease because: the expiration time of the lease has been
reached (and the lease has already expired) before the renewal
request can be made; the renewal request has been denied by the
lease grantor, even even though the desired absolute expiration time
of the lease has not yet been reached; or the renewal request could
not be completed before the expiration of the lease.
Note that prior to invoking this method, the
LeaseRenewalManager
removes the affected lease
from the managed set of leases. Note also that because of the
re-entrancy guarantee made by the LeaseRenewalManager
,
new leases can be safely added from the within any listeners that
implement this interface.
- Parameters:
e
- instance of LeaseRenewalEvent
containing
information about the lease on which a renewal failure
occurred, as well as information about the condition that
caused the renewal attempt to fail
Copyright © 1999 Sun Microsystems, Inc. All rights reserved