jaugment2.jini.leases
Class SimpleLandlord.storedItem

java.lang.Object
  |
  +--jaugment2.jini.leases.SimpleLandlord.storedItem
Enclosing class:
SimpleLandlord

private class SimpleLandlord.storedItem
extends java.lang.Object
implements com.sun.jini.lease.landlord.LeasedResource, java.lang.Comparable

an abstract item stored by our lease-management-code


Field Summary
private  java.lang.Object cookie
           
private  java.lang.Object item
           
private  long leaseExpiration
           
 
Constructor Summary
(package private) SimpleLandlord.storedItem(long leaseExpiration, java.lang.Object cookie, java.lang.Object item)
           
 
Method Summary
 int compareTo(java.lang.Object o)
          we are comparable, so we can be stored sorted by expiration-date
 java.lang.Object getCookie()
           
 long getExpiration()
           
 java.lang.Object getItem()
           
 void setExpiration(long newExpiration)
           
 void setItem(java.lang.Object item)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

leaseExpiration

private long leaseExpiration

cookie

private java.lang.Object cookie

item

private java.lang.Object item
Constructor Detail

SimpleLandlord.storedItem

SimpleLandlord.storedItem(long leaseExpiration,
                          java.lang.Object cookie,
                          java.lang.Object item)
Method Detail

setExpiration

public void setExpiration(long newExpiration)
Specified by:
setExpiration in interface com.sun.jini.lease.landlord.LeasedResource

getExpiration

public long getExpiration()
Specified by:
getExpiration in interface com.sun.jini.lease.landlord.LeasedResource

getCookie

public java.lang.Object getCookie()
Specified by:
getCookie in interface com.sun.jini.lease.landlord.LeasedResource

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
we are comparable, so we can be stored sorted by expiration-date
Specified by:
compareTo in interface java.lang.Comparable

getItem

public java.lang.Object getItem()

setItem

public void setItem(java.lang.Object item)