Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.jini.lease
Interface LeaseListener

All Superinterfaces:
  EventListener

All Known Subinterfaces:
  DesiredExpirationListener

public interface LeaseListener
extends EventListener

The interface that receivers of `LeaseRenewalEvent` instances must implement.

With respect to an entity that uses the `LeaseRenewalManager` to manage leases granted to the entity, this interface defines the mechanism through which an entity receives notification that the `LeaseRenewalManager` has failed to renew one of the leases the `LeaseRenewalManager` is managing for the entity. Such renewal failures typically occur because of one of the following conditions is met:

- After successfully renewing a lease any number of times and experiencing no failures, the `LeaseRenewalManager` determines, prior to the next renewal attempt, that the actual expiration time of the lease has passed, implying that any further attempt to renew the lease would be fruitless.
- An indefinite exception occurs during each attempt to renew a lease, from the point that the first such exception occurs until the point when the `LeaseRenewalManager` determines that lease's actual expiration time has passed.
- A bad object, bad invocation, or `LeaseException` occurs during a lease renewal attempt (collectively referred to as definite exceptions).

It is the responsibility of the entity to register with the `LeaseRenewalManager`. The object that implements this interface 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:
  `Lease`, `LeaseRenewalManager`, `LeaseRenewalEvent`

Method Summary
`void` | `notify(LeaseRenewalEvent e)` Called by the `LeaseRenewalManager` when it cannot renew a lease that it is managing, and the lease's desired expiration time has not yet been reached.

Method Detail

### notify

    public void notify(LeaseRenewalEvent e)

  Called by the `LeaseRenewalManager` when it cannot renew a lease that it is managing, and the lease's desired expiration time has not yet been reached.

  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 reentrancy guarantee made by the `LeaseRenewalManager`, new leases can be safely added by this method.

  Parameters:
    `e` - instance of `LeaseRenewalEvent` containing information about the lease that the `LeaseRenewalManager` was unable to renew, as well as information about the condition that made the `LeaseRenewalManager` fail to renew the lease

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved