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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.fetish.directory.tool.FetishLeaseProxy
All Implemented Interfaces:
java.io.Serializable

public class FetishLeaseProxy
extends java.lang.Object
implements java.io.Serializable

Local proxy for the remote Fetish leases.


Field Summary
private  long expiration
           
(package private)  FetishLease lease
           
private  long roundtrip
           
private  int serialFormat
           
 
Constructor Summary
FetishLeaseProxy()
           
FetishLeaseProxy(FetishLease lease, long duration, int serialFormat)
           
 
Method Summary
 boolean canBatch(Lease lease)
          Checks wether this lease can be batched with another.
 void cancel()
          Cancel this lease and remove the associated service registration.
 LeaseMap createLeaseMap(long duration)
           
 long getExpiration()
           
 int getSerialFormat()
           
 void renew(long duration)
          Attempt to renew the lease for the specified duration.
 void setSerialFormat(int format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lease

FetishLease lease

expiration

private long expiration

serialFormat

private int serialFormat

roundtrip

private long roundtrip
Constructor Detail

FetishLeaseProxy

public FetishLeaseProxy()

FetishLeaseProxy

public FetishLeaseProxy(FetishLease lease,
                        long duration,
                        int serialFormat)
                 throws java.rmi.RemoteException
Method Detail

getExpiration

public long getExpiration()

cancel

public void cancel()
            throws UnknownLeaseException,
                   java.rmi.RemoteException
Cancel this lease and remove the associated service registration.


renew

public void renew(long duration)
           throws LeaseDeniedException,
                  UnknownLeaseException,
                  java.rmi.RemoteException
Attempt to renew the lease for the specified duration. If duration is too high the underlying Jini Lookup Service will deny it, and the lease will remain untouched.


setSerialFormat

public void setSerialFormat(int format)

getSerialFormat

public int getSerialFormat()

createLeaseMap

public LeaseMap createLeaseMap(long duration)

canBatch

public boolean canBatch(Lease lease)
Checks wether this lease can be batched with another.
Fetish leases cannot be batched, this method returns always false.