|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--sdlip.helpers.Timer
Timer. Usage:
Timer mytimer = new Timer(3, this, false);
Timer mytimer = new Timer(3);
Field Summary | |
static int |
REGULAR
User timer. |
static int |
ROBUST
User timer. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
Timer(int reltime)
Creates a timer which has no Timeoutable. |
|
Timer(int reltime,
Timeoutable to,
java.lang.Object handle)
Creates a "robust" timer. |
|
Timer(int reltime,
Timeoutable to,
java.lang.Object handle,
int timerType)
General user timer constructor. |
Method Summary | |
java.lang.Object |
getHandle()
Delivers the handle that is passed to the Timeoutable |
int |
getTimeout()
Returns remaining time until timeout method is called. |
Timeoutable |
getTimeoutable()
Delivers the Timeoutable under observation |
int |
getType()
Returns REGULAR or ROBUST for a user timer. |
void |
interrupt()
stop the timer |
boolean |
isTimedOut()
|
static void |
main(java.lang.String[] args)
|
void |
run()
The running instance of the Timer. |
void |
setAbsolute(long abstime)
Sets absolute time for timeout |
void |
setTimeout(int reltime)
Sets a new timeout |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int REGULAR
public static final int ROBUST
Constructor Detail |
public Timer(int reltime, Timeoutable to, java.lang.Object handle, int timerType)
public Timer(int reltime, Timeoutable to, java.lang.Object handle)
public Timer(int reltime)
Method Detail |
public int getTimeout()
public boolean isTimedOut()
public void setTimeout(int reltime)
public void setAbsolute(long abstime)
public Timeoutable getTimeoutable()
public java.lang.Object getHandle()
public int getType()
public void interrupt()
public java.lang.String toString()
public void run()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |