|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--one.world.binding.LeaseMaintainer
A LeaseMaintainer automatically renews a lease until it is explicitly
canceled. The LeaseMaintainer class also includes a static cancel() method that can be used to cancel any lease.
| Inner Class Summary | |
static class |
LeaseMaintainer.Cancel
The event handler for processing lease cancellation. |
| Field Summary | |
static LeaseMaintainer.Cancel |
CANCEL
The event handler for processing lease cancellations. |
| Constructor Summary | |
LeaseMaintainer(BindingRequest request,
EventHandler factory,
Timer timer)
Constructs a new LeaseMaintainer. |
|
LeaseMaintainer(EventHandler lease,
long duration,
EventHandler notify,
Object closure,
Timer timer)
Constructs a new lease maintainer. |
|
| Method Summary | |
void |
cancel()
Cancels the lease asynchronously. |
static void |
cancel(EventHandler lease)
Cancel the lease managed by the specified event handler. |
void |
cancel(Operation operation)
Cancels the lease using an operation. |
void |
cancel(Operation operation,
Object closure)
Cancels the lease using an operation. |
protected void |
finalize()
Finalize this lease maintainer. |
EventHandler |
getLease()
Gets the lease. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final LeaseMaintainer.Cancel CANCEL
| Constructor Detail |
public LeaseMaintainer(BindingRequest request,
EventHandler factory,
Timer timer)
request - The binding request for the desired resource.factory - The event handler to ask for the resource.timer - A timer component.
public LeaseMaintainer(EventHandler lease,
long duration,
EventHandler notify,
Object closure,
Timer timer)
lease - The lease to maintain.duration - The initial lease duration.notify - The event handler to be notified of any exceptions.closure - The closure to use for any such notifications.timer - A timer component.| Method Detail |
protected void finalize()
finalize in class Objectpublic void cancel()
public void cancel(Operation operation)
Operation.request handler; do not use the operation
concurrently for anything else.operation - The operation to use.
public void cancel(Operation operation,
Object closure)
Operation.request handler; do not use the operation
concurrently for anything else.operation - The operation to use.closure - The closure to use for the lease cancellation
event.public EventHandler getLease()
public static void cancel(EventHandler lease)
Calling this method is equivalent to calling
lease.handle(new
LeaseEvent(CANCEL, null, LeaseEvent.CANCEL,
null, null, 0));
The specified event handler must be an event handler managing a lease.
lease - The event handler managing the lease to cancel.LeaseMaintainer.Cancel,
CANCEL
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||