Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.fetish.directory.tool
Class FetishLeaseImpl  view FetishLeaseImpl download FetishLeaseImpl.java

java.lang.Object
  extended bycom.fetish.directory.tool.FetishLeaseImpl
All Implemented Interfaces:
FetishLease, java.rmi.Remote

public class FetishLeaseImpl
extends java.lang.Object
implements FetishLease

Implementation of the FetishLease interface


Nested Class Summary
(package private)  class FetishLeaseImpl.ExpirationWatcher
           
 
Field Summary
private  long expiration
           
private  java.lang.Object expirationLock
           
private  com.fetish.directory.Directory fada
           
private  Lease lease
           
private  java.util.Hashtable registry
           
private  ServiceID sid
           
private  java.lang.Thread t
           
 
Constructor Summary
FetishLeaseImpl()
           
FetishLeaseImpl(Lease lease, java.util.Hashtable registry, ServiceID sid)
           
 
Method Summary
 void cancel()
          Cancel this Fetish lease.
 long renew(long duration)
          Renew this Fetish lease for the specified amount of milliseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lease

private Lease lease

fada

private com.fetish.directory.Directory fada

registry

private java.util.Hashtable registry

sid

private ServiceID sid

expirationLock

private java.lang.Object expirationLock

t

private java.lang.Thread t

expiration

private long expiration
Constructor Detail

FetishLeaseImpl

public FetishLeaseImpl()
                throws java.rmi.RemoteException

FetishLeaseImpl

public FetishLeaseImpl(Lease lease,
                       java.util.Hashtable registry,
                       ServiceID sid)
Method Detail

cancel

public void cancel()
            throws UnknownLeaseException,
                   java.rmi.RemoteException
Description copied from interface: FetishLease
Cancel this Fetish lease. The service proxy associated with this FetishLease will be deleted from both the FADA registry and the underlying Jini registry.

Specified by:
cancel in interface FetishLease

renew

public long renew(long duration)
           throws LeaseDeniedException,
                  UnknownLeaseException,
                  java.rmi.RemoteException
Description copied from interface: FetishLease
Renew this Fetish lease for the specified amount of milliseconds. Tries to obtain a Fetish lease of the requested duration. It is safe to call this method with Lease.ANY as a parameter, meaning to get a lease time at the Jini Lookup Service will.

Specified by:
renew in interface FetishLease