class EventLease extends RegistrarLease
| Modifier and Type | Field and Description |
|---|---|
(package private) long |
eventID
The eventID returned in the EventRegistration.
|
private static String |
LEASE_TYPE
The type of the lease used in toString() calls.
|
private static long |
serialVersionUID |
leaseID, registrarID, serverexpiration, serialFormat| Constructor and Description |
|---|
EventLease(Registrar server,
ServiceID registrarID,
long eventID,
Uuid leaseID,
long expiration)
Constructor for use by getInstance(), ConstrainableEventLease.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Used by the lease holder to indicate that it is no longer interested
in the resource or information held by the lease.
|
protected long |
doRenew(long duration)
Renews the event lease associated with an instance of this class.
|
(package private) static EventLease |
getInstance(Registrar server,
ServiceID registrarID,
long eventID,
Uuid leaseID,
long expiration)
Returns EventLease or ConstrainableEventLease instance, depending on
whether given server implements RemoteMethodControl.
|
(package private) String |
getLeaseType()
Returns the type of the lease.
|
(package private) Object |
getRegID()
Returns the service ID, or the event ID as a Long.
|
private void |
readObjectNoData()
Throws InvalidObjectException, since data for this class is required.
|
canBatch, createLeaseMap, equals, getReferentUuid, getRegistrar, getRegistrarID, hashCode, identity, setExpiration, toStringgetExpiration, getSerialFormat, renew, setSerialFormatprivate static final long serialVersionUID
private static final String LEASE_TYPE
final long eventID
static EventLease getInstance(Registrar server, ServiceID registrarID, long eventID, Uuid leaseID, long expiration)
public void cancel()
throws UnknownLeaseException,
RemoteException
LeaseUnknownLeaseException - the lease being cancelled is unknown
to the lease grantorRemoteExceptionprotected long doRenew(long duration)
throws UnknownLeaseException,
RemoteException
doRenew in class AbstractLeaseduration - the requested duration for the lease being renewedUnknownLeaseException - indicates the lease does not exist;
typically because the lease has expired.RemoteExceptionObject getRegID()
RegistrarLeasegetRegID in class RegistrarLeaseString getLeaseType()
RegistrarLeasegetLeaseType in class RegistrarLeaseprivate void readObjectNoData()
throws ObjectStreamException
ObjectStreamExceptionCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.