|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.lease.AbstractLease
com.sun.jini.reggie.RegistrarLease
com.sun.jini.reggie.EventLease
class EventLease
When a registrar (lookup service) grants a lease on an event registration on behalf of some object (client), a proxy is employed to allow the client to interact with the lease; this class is the implementation of that proxy. Clients only see instances of this class via the Lease interface.
Field Summary | |
---|---|
(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
|
Fields inherited from class com.sun.jini.reggie.RegistrarLease |
---|
leaseID, registrarID, server |
Fields inherited from class com.sun.jini.lease.AbstractLease |
---|
expiration, serialFormat |
Fields inherited from interface net.jini.core.lease.Lease |
---|
ABSOLUTE, ANY, DURATION, FOREVER |
Constructor Summary | |
---|---|
EventLease(Registrar server,
ServiceID registrarID,
long eventID,
Uuid leaseID,
long expiration)
Constructor for use by getInstance(), ConstrainableEventLease. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.sun.jini.reggie.RegistrarLease |
---|
canBatch, createLeaseMap, equals, getReferentUuid, getRegistrar, getRegistrarID, hashCode, setExpiration, toString |
Methods inherited from class com.sun.jini.lease.AbstractLease |
---|
getExpiration, getSerialFormat, renew, setSerialFormat |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private static final String LEASE_TYPE
final long eventID
Constructor Detail |
---|
EventLease(Registrar server, ServiceID registrarID, long eventID, Uuid leaseID, long expiration)
Method Detail |
---|
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 grantor
RemoteException
protected long doRenew(long duration) throws UnknownLeaseException, RemoteException
doRenew
in class AbstractLease
duration
- the requested duration for the lease being renewed
UnknownLeaseException
- 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |