| 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcontext.arch.discoverer.lease.Lease
This class keeps information about the lease of a context component when it registers to the discoverer. A lease is defined by the component for a given duration defined as un number of timeslots.
context.arch.discoverer.lease.CTKCalendar| Field Summary | |
protected  java.lang.Integer | 
componentIndex
The index of the component owning this lease  | 
static int | 
DEFAULT_DURATION
This constant is the default duration for a component when it does not specify a lease.  | 
protected  java.util.Calendar | 
end
The date of unregistration of the context component  | 
static java.lang.String | 
LEASE
This tag is used to encapsulate a lease dataobject  | 
static java.lang.String | 
LEASE_END
This tag is used by the context component to stop its lease  | 
static java.lang.String | 
LEASE_END_NOTIFICATION
This tag is used by the discoverer to inform the context component of the end of its lease.  | 
static java.lang.String | 
LEASE_ERROR
This tag is used to specify an error  | 
static java.lang.String | 
LEASE_RENEWAL
This tag is used by the context component to extend its lease  | 
protected  int | 
nbRenewal
The number of lease renewal the context component has done  | 
protected  int | 
nbTimeSlots
This number specify the duration of the lease as a number of timeslots  | 
protected  java.util.Calendar | 
start
The date of first registration of the context component  | 
static int | 
TIME_SLOT_MILLIS
This constant defines the smallest time slot.  | 
static java.lang.String | 
TIMESLOTS
This tag is used to specify the lease number of time slots  | 
| Constructor Summary | |
Lease()
Creates new Lease with the default duration  | 
|
Lease(int numberOfTimeSlots)
Creates new Lease with the specified number of timeslots  | 
|
| Method Summary | |
static Lease | 
dataObjectToLease(DataObject dataObject)
This method allows to convert a DataObject to a Lease object  | 
 java.lang.Integer | 
getComponentIndex()
Returns the component index information  | 
 java.util.Calendar | 
getEndDate()
 | 
 java.util.Calendar | 
getStartDate()
 | 
 void | 
setComponentIndex(java.lang.Integer index)
Set the component index information  | 
 void | 
setStartDate()
This method allows to put the current date/time as the start date of the lease.  | 
 void | 
setStartDate(java.util.Calendar date)
This method allows to set the start date of the lease and then update the end date  | 
 DataObject | 
toDataObject()
This method returns the DataObject version of the Lease object  | 
 long | 
toMinutes()
This method returns the duration of the lease in minutes  | 
 java.lang.String | 
toString()
Returns a printable version of a Lease object  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
public static final int DEFAULT_DURATION
public static final int TIME_SLOT_MILLIS
public static final java.lang.String LEASE
public static final java.lang.String LEASE_END_NOTIFICATION
public static final java.lang.String LEASE_RENEWAL
public static final java.lang.String LEASE_END
public static final java.lang.String TIMESLOTS
public static final java.lang.String LEASE_ERROR
protected java.util.Calendar start
protected java.util.Calendar end
protected int nbRenewal
protected java.lang.Integer componentIndex
protected int nbTimeSlots
| Constructor Detail | 
public Lease()
public Lease(int numberOfTimeSlots)
| Method Detail | 
public DataObject toDataObject()
public java.lang.String toString()
public long toMinutes()
public void setComponentIndex(java.lang.Integer index)
index - The index of the component description owning the leasepublic java.lang.Integer getComponentIndex()
public void setStartDate()
public void setStartDate(java.util.Calendar date)
date - The Calendar objectpublic java.util.Calendar getStartDate()
public java.util.Calendar getEndDate()
public static Lease dataObjectToLease(DataObject dataObject)
dataObject - The dataObject containing lease information
  | 
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||