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, server
expiration, 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, setExpiration, toString
getExpiration, getSerialFormat, renew, setSerialFormat
private 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
Lease
UnknownLeaseException
- the lease being cancelled is unknown
to the lease grantorRemoteException
protected long doRenew(long duration) throws UnknownLeaseException, RemoteException
doRenew
in class AbstractLease
duration
- the requested duration for the lease being renewedUnknownLeaseException
- indicates the lease does not exist;
typically because the lease has expired.RemoteException
Object getRegID()
RegistrarLease
getRegID
in class RegistrarLease
String getLeaseType()
RegistrarLease
getLeaseType
in class RegistrarLease
private void readObjectNoData() throws ObjectStreamException
ObjectStreamException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.