GigaSpaces XAP 9.7.2 API

net.jini.lease
Class LeaseRenewalEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.jini.lease.LeaseRenewalEvent
All Implemented Interfaces:
Serializable

public class LeaseRenewalEvent
extends EventObject

Event generated when a LeaseRenewalManager cannot renew a lease.

The LeaseRenewalEvent instances are sent to the LeaseListener (if any) associated with a given lease when the lease was added to the managed set. These events are typically generated because one of the following conditions occur:

Note that bad object exceptions, bad invocation exceptions, and LeaseExceptions are all considered definite exceptions.

This class encapsulates information about both the lease for which the failure occurred, as well as information about the condition that caused the renewal attempt to fail.

This class is a subclass of the class EventObject, adding the following additional items of abstract state:

In addition to the methods of the EventObject class, this class defines methods through which this additional state may be retrieved.

The source associated with a LeaseRenewalEvent will be the LeaseRenewalManager that generated the event.

Author:
Sun Microsystems, Inc.
See Also:
Lease, LeaseException, LeaseRenewalManager, LeaseListener, EventObject, Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LeaseRenewalEvent(Object source, Lease lease, long expiration, Throwable ex)
          Constructs an instance of this class with the specified state.
 
Method Summary
 Throwable getException()
          Returns the exception (if any) that caused the event to be sent.
 long getExpiration()
          Returns the desired expiration time of the lease to which event pertains.
 Lease getLease()
          Returns a reference to the lease to which the event pertains.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LeaseRenewalEvent

public LeaseRenewalEvent(Object source,
                         Lease lease,
                         long expiration,
                         Throwable ex)
Constructs an instance of this class with the specified state.

Parameters:
source - reference to the instance of the LeaseRenewalManager that generated the event
lease - the lease to which the event pertains
expiration - the desired expiration time for the affected lease
ex - the Throwable associated with the last renewal attempt (if any)
See Also:
Lease, LeaseRenewalManager
Method Detail

getLease

public Lease getLease()
Returns a reference to the lease to which the event pertains.

Returns:
the Lease object corresponding to the lease on which the renewal attempt failed
See Also:
Lease

getExpiration

public long getExpiration()
Returns the desired expiration time of the lease to which event pertains.

Returns:
a long value that represents the desired expiration time of the lease on which the renewal attempt failed

getException

public Throwable getException()
Returns the exception (if any) that caused the event to be sent. The conditions under which the event may be sent, and the related values returned by this method, are as follows:

Returns:
an instance of Throwable or null, indicating the condition that caused the LeaseRenewalManager to fail to renew the affected lease

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.