cgl.hpsearch.common
Class Timer
java.lang.Object
java.lang.Thread
cgl.hpsearch.common.Timer
- All Implemented Interfaces:
- Runnable
- public class Timer
- extends Thread
Implements a Timer that triggers an event on timeout.
Created on May 26, 2004
- Author:
- Harshawardhan Gadgil (hgadgil@grids.ucs.indiana.edu)
|
Method Summary |
void |
reset()
Resets and restarts the timer |
void |
run()
|
void |
setTimeout(int to)
Resets the timout to a new value |
void |
stopTimer()
Stops the timer. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Timer
public Timer()
Timer
public Timer(int to,
TimerExpiryListener client,
Object o)
- Creates a new Timer object
- Parameters:
to - -
default timeout in seconds
setTimeout
public void setTimeout(int to)
- Resets the timout to a new value
- Parameters:
to - -
the new timeout in seconds
reset
public void reset()
- Resets and restarts the timer
stopTimer
public void stopTimer()
- Stops the timer. This also ends the Thread associated w/ the timer object
run
public void run()