com.sun.jini.lease.landlord
Interface LeasedResource


public abstract interface LeasedResource

Leased resources must meet this interface if they are to be used with LeaseDurationPolicy and/or LeaseManager

See Also:
LeaseDurationPolicy, LeaseManager

Method Summary
 java.lang.Object getCookie()
          Returns a unique identifier that can be used by the grantor of the resource to identify it in the context of a Landlord.renew() or Landlord.cancel() call.
 long getExpiration()
          Returns the expiration time of the leased resource.
 void setExpiration(long newExpiration)
          Changes the expiration time of the leased resource.
 

Method Detail

setExpiration

public void setExpiration(long newExpiration)
Changes the expiration time of the leased resource.
Parameters:
newExpiration - The new expiration time in milliseconds since the beginning of the epoch

getExpiration

public long getExpiration()
Returns the expiration time of the leased resource.
Returns:
The expiration time in milliseconds since the beginning of the epoch

getCookie

public java.lang.Object getCookie()
Returns a unique identifier that can be used by the grantor of the resource to identify it in the context of a Landlord.renew() or Landlord.cancel() call. In general this object will be passed between VMs using RMI so care should be taken in not making this object bigger than it needs to be.
See Also:
Landlord.renew(java.lang.Object, long), Landlord.cancel(java.lang.Object)


Copyright © 1999 Sun Microsystems, Inc. All rights reserved