|
||||||||||
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.ServiceLease
class ServiceLease
A ServiceLease is a proxy for a service registration lease at a registrar. Clients only see instances via the Lease interface.
Field Summary | |
---|---|
private static String |
LEASE_TYPE
The type of the lease used in toString() calls. |
private static long |
serialVersionUID
|
(package private) ServiceID |
serviceID
The service id assigned at registration. |
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 | |
---|---|
ServiceLease(Registrar server,
ServiceID registrarID,
ServiceID serviceID,
Uuid leaseID,
long expiration)
Constructor for use by getInstance(), ConstrainableServiceLease. |
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)
Do the actual renew. |
(package private) static ServiceLease |
getInstance(Registrar server,
ServiceID registrarID,
ServiceID serviceID,
Uuid leaseID,
long expiration)
Returns ServiceLease or ConstrainableServiceLease 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. |
(package private) ServiceID |
getServiceID()
Returns the service ID |
private void |
readObject(ObjectInputStream in)
Reads the service ID, encoded as specified by the ServiceID.writeBytes method. |
private void |
readObjectNoData()
Throws InvalidObjectException, since data for this class is required. |
private void |
writeObject(ObjectOutputStream out)
Writes the service ID, encoded as specified by the ServiceID.writeBytes method. |
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
transient ServiceID serviceID
Constructor Detail |
---|
ServiceLease(Registrar server, ServiceID registrarID, ServiceID serviceID, Uuid leaseID, long expiration)
Method Detail |
---|
static ServiceLease getInstance(Registrar server, ServiceID registrarID, ServiceID serviceID, 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
UnknownLeaseException
RemoteException
ServiceID getServiceID()
Object getRegID()
RegistrarLease
getRegID
in class RegistrarLease
String getLeaseType()
RegistrarLease
getLeaseType
in class RegistrarLease
private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void readObjectNoData() throws ObjectStreamException
ObjectStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |