org.exolab.jms.lease
Interface LeaseIfc

All Known Implementing Classes:
BaseLease

public interface LeaseIfc

A lease is used to track message exipration. It contains the object to be leased, the duration and the object to callback if or when the lease expirex

Since leases may be persistent we need to store the absolute expiry time so that when the service is restarted it can correctly expire messages

Version:
$Revision: 1.2 $ $Date: 2003/08/07 13:33:00 $
Author:
Jim Alateras

Method Summary
 long getDuration()
          Return the orginal duration of the lease.
 long getExpiryTime()
          Return the absolute expiry time of this lease
 java.lang.Object getLeasedObject()
          Return the leased object
 java.lang.Class getLeasedObjectType()
          Return the class of leased object
 long getRemainingTime()
          Return the time remaining on the lease in milliseconds
 

Method Detail

getExpiryTime

public long getExpiryTime()
Return the absolute expiry time of this lease
Returns:
long

getDuration

public long getDuration()
Return the orginal duration of the lease. The returned value is in milliseconds
Returns:
long

getRemainingTime

public long getRemainingTime()
Return the time remaining on the lease in milliseconds
Returns:
long

getLeasedObject

public java.lang.Object getLeasedObject()
Return the leased object
Returns:
Object

getLeasedObjectType

public java.lang.Class getLeasedObjectType()
Return the class of leased object
Returns:
Class


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.