Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jini.landlord
Interface LocalLandlord

All Known Implementing Classes:
  OutriggerServerImpl

public interface LocalLandlord

Interface that defines the basic landlord primitives (renew and cancel) as local methods. Classes already implementing `Landlord` should be able to implement this interface simply by adding it the the `implements` clause of their class declaration.

Some users may want to implement this interface using an adaptor class. This could be useful in situations where the landlord's cancel and renew methods don't do quite the right thing for batch lease operations

This interface gives local landlord utilities access to the cancel and renew methods.

Since:
  2.0
See Also:
  `Landlord`

Method Summary
`void` | `cancel(Uuid cookie)` Cancel the lease that is associated with the given cookie.
`long` | `renew(Uuid cookie, long duration)` Renew the lease that is associated with the given cookie.

Method Detail

### renew

    public long renew(Uuid cookie,
                      long duration)
               throws LeaseDeniedException,
                      UnknownLeaseException

  Renew the lease that is associated with the given cookie.

  Parameters:
    `cookie` - an object that universally and uniquely identifies a lease granted by this `LocalLandlord`
    `duration` - the duration in milliseconds the client wants the lease renewed for
  Returns:
    The new duration the lease should have
  Throws:
    `LeaseDeniedException` - if the landlord is unwilling to renew the lease
    `UnknownLeaseException` - if landlord does not know about a lease with the specified `cookie`

### cancel

    public void cancel(Uuid cookie)
                throws UnknownLeaseException

  Cancel the lease that is associated with the given cookie.

  Parameters:
    `cookie` - an object that universally and uniquely identifies a lease granted by this `LocalLandlord`
  Throws:
    `UnknownLeaseException` - if landlord does not know about a lease with the specified `cookie`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Sun Microsystems, Inc. All rights reserved