| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.j_spaces.core.LeaseProxy
public class LeaseProxy
An instance of this class represents an entry/template lease or
 a lease of an event registration results from a
 notify.
 
 You can get entry UID from the entry Lease object. e.g.
 
 Message o = new Message ("A");
 Lease lease = space.write(o, null, Lease.FOREVER);
 LeaseProxy lp = (LeaseProxy) lease;
 String uid = lp.getUID();
  
| Field Summary | 
|---|
| Fields inherited from interface net.jini.core.lease.Lease | 
|---|
ABSOLUTE, ANY, DURATION, FOREVER | 
| Constructor Summary | |
|---|---|
LeaseProxy()
default constructor for Externalizable. | 
|
LeaseProxy(LeaseProxy lease)
Copy constractor to create the super Classes  | 
|
LeaseProxy(long absExprTime,
           String uid,
           com.j_spaces.core.JSpaceImpl spaceImpl)
Construct a relative-format lease for Transient space.  | 
|
LeaseProxy(long absExprTime,
           String uid,
           com.j_spaces.core.JSpaceImpl spaceImpl,
           String classname,
           int objectType)
Construct a relative-format lease for Persistent space.  | 
|
| Method Summary | |
|---|---|
 boolean | 
canBatch(Lease lease)
 | 
 void | 
cancel()
 | 
 LeaseMap | 
createLeaseMap(long duration)
 | 
 String | 
getClassname()
Returns a class name of lease resource( Entry/Notify Template ).  | 
 EntryInfo | 
getEntryInfo()
Returns EntryInfo of written Entry.  | 
 long | 
getExpiration()
 | 
 Object | 
getObject()
returns the previous value associated with this update-or-write operation.  | 
 int | 
getObjectType()
Returns type of Lease resource.  | 
 int | 
getSerialFormat()
 | 
 String | 
getUID()
Returns UID of written Entry.  | 
 boolean | 
isTimeout()
 | 
 void | 
readExternal(ObjectInput in)
 | 
 void | 
renew(long duration)
 | 
 void | 
setSerialFormat(int format)
 | 
 void | 
setUID(String uid)
Sets UID of written Entry.  | 
 void | 
writeExternal(ObjectOutput out)
 | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public LeaseProxy()
Externalizable.
 for internal use only
public LeaseProxy(long absExprTime,
                  String uid,
                  com.j_spaces.core.JSpaceImpl spaceImpl)
public LeaseProxy(long absExprTime,
                  String uid,
                  com.j_spaces.core.JSpaceImpl spaceImpl,
                  String classname,
                  int objectType)
public LeaseProxy(LeaseProxy lease)
lease - | Method Detail | 
|---|
public boolean canBatch(Lease lease)
canBatch in interface Lease
public void cancel()
            throws UnknownLeaseException,
                   RemoteException
cancel in interface LeaseUnknownLeaseException
RemoteExceptionpublic LeaseMap createLeaseMap(long duration)
createLeaseMap in interface Leasepublic long getExpiration()
getExpiration in interface Leasepublic int getSerialFormat()
getSerialFormat in interface Leasepublic void setSerialFormat(int format)
setSerialFormat in interface Lease
public void renew(long duration)
           throws LeaseDeniedException,
                  UnknownLeaseException,
                  RemoteException
renew in interface LeaseLeaseDeniedException
UnknownLeaseException
RemoteExceptionpublic String getClassname()
public int getObjectType()
public String getUID()
getUID in interface LeaseContextpublic void setUID(String uid)
UID - of written Entry.public EntryInfo getEntryInfo()
public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
                   throws IOException
writeExternal in interface ExternalizableIOExceptionpublic Object getObject()
getObject in interface LeaseContextnull indicating a successful write.public boolean isTimeout()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||