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
Class LandlordUtil

    java.lang.Object
      com.sun.jini.landlord.LandlordUtil

public class LandlordUtil
extends Object

Static methods useful for implementing landlords.

Since:
  2.0

Constructor Summary
`LandlordUtil()`

Method Summary
`static Map` | `cancelAll(LocalLandlord landlord, Uuid[] cookies)` Call `landlord.cancel()` for each object in `cookies[]`, passing `cookies[i]`.
`static Landlord.RenewResults` | `renewAll(LocalLandlord landlord, Uuid[] cookies, long[] durations)` Call `landlord.renew()` for each object in `cookie[]`, passing `cookie[i]` and `durations[i]`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LandlordUtil

    public LandlordUtil()

Method Detail

### renewAll

    public static Landlord.RenewResults renewAll(LocalLandlord landlord,
                                                 Uuid[] cookies,
                                                 long[] durations)

  Call `landlord.renew()` for each object in `cookie[]`, passing `cookie[i]` and `durations[i]`. Gather the results and exceptions into a `RenewResults` object.

  Parameters:
    `landlord` - A grantor of leases.
    `cookies` - an array of `Uuid`s, each uniquely and universally identifying a lease
    `durations` - an array of longs, each representing a duration in milliseconds that the client wants the lease associated with the object from the corresponding element of `cookies` renewed for.
  Returns:
    A `RenewResults` object that contains the new duration of each lease that was successfully renewed or the exception encountered for each lease that could not be renewed.

### cancelAll

    public static Map cancelAll(LocalLandlord landlord,
                                Uuid[] cookies)

  Call `landlord.cancel()` for each object in `cookies[]`, passing `cookies[i]`.

  Parameters:
    `landlord` - a grantor of leases
    `cookies` - an array of `Uuid`s, each uniquely and universally identifying a lease
  Returns:
    If no exceptions are encountered, return `null`, otherwise, return a Map that for each failed `cancel()` call maps the passed cookie object to the exception that was generated

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