|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.aglets.security.Lifetime
The Lifetime class shows life-time of an aglet.
Field Summary | |
static java.util.Date |
UNLIMITED
Infinite lifetime. |
static java.lang.String |
UNLIMITED_LABEL
|
Constructor Summary | |
Lifetime()
Creates lifetime. |
|
Lifetime(java.util.Date limit)
Creates lifetime. |
|
Lifetime(Lifetime lifetime)
Creates lifetime as a copy. |
|
Lifetime(java.lang.String lifetime)
Creates lifetime. |
Method Summary | |
java.lang.Object |
clone()
Returns a clone of the lifetime. |
static java.util.Date |
currentDate()
Returns whether the time is over the limit of lifetime. |
boolean |
equals(java.lang.Object obj)
Returns whether the lifetime equal to lifetime. |
java.util.Date |
getLimit()
Gets the available lifetime. |
boolean |
isAbsolute()
Returns whether the life time is absolute. |
boolean |
isGreaterThan(java.util.Date date)
Returns whether the lifetime is greater than lifetime. |
boolean |
isGreaterThan(Lifetime lifetime)
Returns whether the lifetime is greater than lifetime. |
boolean |
isGreaterThan(long life)
Returns whether the lifetime is greater than lifetime. |
boolean |
isLimited()
Returns whether the lifetime is limited. |
static boolean |
isLimited(java.util.Date limit)
Returns whether the lifetime is limited. |
static boolean |
isLimited(Lifetime lifetime)
Returns whether the lifetime is limited. |
static boolean |
isLimited(java.lang.String lifetime)
Returns whether the lifetime is limited. |
boolean |
isOver()
Returns whether the time is over the limit of lifetime. |
static boolean |
isOver(java.util.Date limit)
Returns whether the time is over the limit of lifetime. |
boolean |
isRelative()
Returns whether the life time is relative. |
void |
limit(java.util.Date date)
Limits the lifetime. |
void |
limit(Lifetime lifetime)
Limits the lifetime. |
void |
limit(long life)
Limits the lifetime. |
static void |
main(java.lang.String[] arg)
For test. |
void |
setLifetime(java.util.Date lifetime)
Sets the lifetime. |
void |
setLifetime(Lifetime lifetime)
Sets the lifetime. |
void |
setLifetime(java.lang.String lifetime)
Sets the lifetime. |
void |
subtractLifetime(long life)
Subtracts lifetime. |
java.lang.String |
toString()
Returns a string of the lifetime. |
java.lang.String |
toString(boolean relative)
Returns a string of the lifetime. |
java.lang.String |
toString(boolean relative,
java.lang.String format)
Returns a string of the lifetime. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.util.Date UNLIMITED
public static final java.lang.String UNLIMITED_LABEL
Constructor Detail |
public Lifetime()
public Lifetime(Lifetime lifetime)
public Lifetime(java.lang.String lifetime) throws java.lang.NumberFormatException
public Lifetime(java.util.Date limit)
Method Detail |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
public static java.util.Date currentDate()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.Date getLimit()
public boolean isAbsolute()
public boolean isGreaterThan(long life)
life
- absolute life time [milliseconds]public boolean isGreaterThan(Lifetime lifetime)
date
- absolute life timepublic boolean isGreaterThan(java.util.Date date)
date
- absolute life timepublic boolean isLimited()
public static boolean isLimited(Lifetime lifetime)
lifetime
- lifetimepublic static boolean isLimited(java.lang.String lifetime)
lifetime
- lifetimepublic static boolean isLimited(java.util.Date limit)
limit
- date limitpublic boolean isOver()
public static boolean isOver(java.util.Date limit)
public boolean isRelative()
public void limit(long life)
life
- absolute life time [milliseconds]public void limit(Lifetime lifetime)
lifetime
- lifetimepublic void limit(java.util.Date date)
date
- absolute timepublic static void main(java.lang.String[] arg)
public void setLifetime(Lifetime lifetime)
lifetime
- lifetimepublic void setLifetime(java.lang.String lifetime) throws java.lang.NumberFormatException
lifetime
- lifetimepublic void setLifetime(java.util.Date lifetime)
lifetime
- lifetimepublic void subtractLifetime(long life)
life
- life time [milliseconds]public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean relative)
relative
- in relative formatpublic java.lang.String toString(boolean relative, java.lang.String format)
relative
- in relative formatformat
- format of date string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |