|
||||||||||
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
abstract class RegistrarLease
The base class for lease proxies.
Field Summary | |
---|---|
(package private) Uuid |
leaseID
The internal lease id. |
(package private) ServiceID |
registrarID
The registrar's service ID. |
private static long |
serialVersionUID
|
(package private) Registrar |
server
The registrar. |
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 | |
---|---|
RegistrarLease(Registrar server,
ServiceID registrarID,
Uuid leaseID,
long expiration)
Simple constructor. |
Method Summary | |
---|---|
boolean |
canBatch(Lease lease)
Two leases can be batched if they are both RegistrarLeases and have the same server. |
LeaseMap |
createLeaseMap(long duration)
Creates a lease map. |
boolean |
equals(Object obj)
Returns true if lease Uuids match, false otherwise. |
(package private) abstract String |
getLeaseType()
Returns the type of the lease. |
Uuid |
getReferentUuid()
Returns the lease Uuid. |
(package private) abstract Object |
getRegID()
Returns the service ID, or the event ID as a Long. |
(package private) Registrar |
getRegistrar()
Returns the registrar. |
(package private) ServiceID |
getRegistrarID()
Returns the registrar's service ID. |
int |
hashCode()
Returns the lease Uuid's hash code. |
private void |
readObject(ObjectInputStream in)
Reads the default serializable field values for this instance, followed by the registrar's service ID encoded as specified by the ServiceID.writeBytes method. |
private void |
readObjectNoData()
Throws InvalidObjectException, since data for this class is required. |
(package private) void |
setExpiration(long expiration)
Sets the expiration. |
String |
toString()
Returns a string created from the proxy class name, the registrar's service ID, the id of the lessee or event (depending on the subclass), and the result of the underlying server proxy's toString method. |
private void |
writeObject(ObjectOutputStream out)
Writes the default serializable field values for this instance, followed by the registrar's service ID encoded as specified by the ServiceID.writeBytes method. |
Methods inherited from class com.sun.jini.lease.AbstractLease |
---|
doRenew, getExpiration, getSerialFormat, renew, setSerialFormat |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.jini.core.lease.Lease |
---|
cancel |
Field Detail |
---|
private static final long serialVersionUID
final Registrar server
transient ServiceID registrarID
final Uuid leaseID
Constructor Detail |
---|
RegistrarLease(Registrar server, ServiceID registrarID, Uuid leaseID, long expiration)
Method Detail |
---|
public LeaseMap createLeaseMap(long duration)
createLeaseMap
in interface Lease
duration
- the duration to put into a Long and use as the
value for the current lease in the created LeaseMap
public boolean canBatch(Lease lease)
canBatch
in interface Lease
lease
- the Lease to be evaluated
public Uuid getReferentUuid()
getReferentUuid
in interface ReferentUuid
Uuid
associated with the
resource this proxy represents. Will not
return null
.public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
Registrar getRegistrar()
ServiceID getRegistrarID()
abstract Object getRegID()
abstract String getLeaseType()
void setExpiration(long expiration)
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 |