public class WatchdogTimer
extends java.lang.Object
System.exit().
This is useful to cleanup a process which is waiting for a connection that never arrives.
The termination task of this watchdog timer only be started when the process is in a state, where it should be exited at the end of the timeout.
IMPORTANT: Do not use logging anywhere inside this class. When an authentication plugin is running during session establishment with the P2J server using logging no messages are written into the log and the application becomes deadlocked.
| Modifier and Type | Field and Description |
|---|---|
private static CentralLogger |
LOG
Logger
|
private boolean |
running
Flag to control a terminate task execution.
|
private long |
timeout
Time out value in milliseconds.
|
private java.util.Timer |
timer
Watchdog timer
|
| Constructor and Description |
|---|
WatchdogTimer(long timeout)
Create a new instance and start the timer thread.
|
| Modifier and Type | Method and Description |
|---|---|
void |
kill()
Terminate the watchdog timer thread.
|
private static final CentralLogger LOG
private volatile long timeout
private volatile boolean running
private final java.util.Timer timer