com.sun.jini.lease.landlord
Interface Landlord


public abstract interface Landlord
extends java.rmi.Remote

Interface that owners of leased resources must meet inorder to work with the jini.lease.Leases returned by LeaseDurationPolicy.leaseFor().

See Also:
Lease, LeaseDurationPolicy

Inner Class Summary
static class Landlord.RenewResults
          Simple class that holds return values of the Landlord.renewAll method.
 
Method Summary
 void cancel(java.lang.Object cookie)
          Called by the lease when its cancel method is called.
 void cancelAll(java.lang.Object[] cookie)
          Called by the lease map when its cancelAll method is called.
 long renew(java.lang.Object cookie, long extension)
          Called by the lease when its renew method is called.
 Landlord.RenewResults renewAll(java.lang.Object[] cookie, long[] extension)
          Called by the lease map when its renewAll method is called.
 

Method Detail

renew

public long renew(java.lang.Object cookie,
                  long extension)
           throws LeaseDeniedException,
                  UnknownLeaseException,
                  java.rmi.RemoteException
Called by the lease when its renew method is called.
Parameters:
cookie - Associated with the lease when it was created
extension - The duration argument passed to the Lease.renew() call
Returns:
The new duration the lease should have
See Also:
LeasePolicy.leaseFor(com.sun.jini.lease.landlord.LeasedResource, long)

cancel

public void cancel(java.lang.Object cookie)
            throws UnknownLeaseException,
                   java.rmi.RemoteException
Called by the lease when its cancel method is called.
Parameters:
cookie - Associated with the lease when it was created
See Also:
LeasePolicy.leaseFor(com.sun.jini.lease.landlord.LeasedResource, long)

renewAll

public Landlord.RenewResults renewAll(java.lang.Object[] cookie,
                                      long[] extension)
                               throws java.rmi.RemoteException
Called by the lease map when its renewAll method is called.
Parameters:
cookie - Associated with each lease when it was created
extension - The duration argument for each lease from the map
Returns:
The results of the renew
See Also:
LeasePolicy.leaseFor(com.sun.jini.lease.landlord.LeasedResource, long)

cancelAll

public void cancelAll(java.lang.Object[] cookie)
               throws LeaseMapException,
                      java.rmi.RemoteException
Called by the lease map when its cancelAll method is called.
Parameters:
cookie - Associated with the lease when it was created
See Also:
LeasePolicy.leaseFor(com.sun.jini.lease.landlord.LeasedResource, long)


Copyright © 1999 Sun Microsystems, Inc. All rights reserved