net.jini.lease
Class ExpirationWarningEvent
java.lang.Object
java.util.EventObject
net.jini.core.event.RemoteEvent
net.jini.lease.ExpirationWarningEvent
- All Implemented Interfaces:
- Serializable
public class ExpirationWarningEvent
- extends RemoteEvent
Event generated by a lease renewal set when its lease is about to
expire.
- Author:
- Sun Microsystems, Inc.
- See Also:
LeaseRenewalSet
,
Serialized Form
Method Summary |
Lease |
getRenewalSetLease()
Convenience method to retrieve the Lease associated
with the source of this event. |
ExpirationWarningEvent
public ExpirationWarningEvent(LeaseRenewalSet source,
long seqNum,
MarshalledObject handback)
- Simple constructor. Note event id is fixed to
LeaseRenewalSet.EXPIRATION_WARNING_EVENT_ID
.
- Parameters:
source
- the LeaseRenewalSet
that generated the
eventseqNum
- the sequence number of this eventhandback
- the MarshalledObject
passed in as
part of the event registration
getRenewalSetLease
public Lease getRenewalSetLease()
- Convenience method to retrieve the
Lease
associated
with the source of this event. This is the Lease
which is about to expire.
The Lease
object returned will be equivalent (in the
sense of equals
) to other Lease
objects
associated with the set, but may not be the same object. One
notable consequence of having two different objects is that the
getExpiration
method of the Lease
object returned by this method may return a different time than
the getExpiration
methods of other
Lease
objects granted on the same set.
The expiration time associated with the Lease
object
returned by this method will reflect the expiration the lease had
when the event occurred. Renewal calls may have changed the
expiration time of the underlying lease between the time when the
event was generated and when it was delivered.
- Returns:
- the lease associated with the source of this event
Copyright © GigaSpaces.