java.lang.Object |
↳ |
com.pnfsoftware.jeb.util.concurrent.ThreadMonitor |
Class Overview
This class is used to monitor the execution of a target thread. That target thread thread can be
forcefully stopped after a dynamic timeout has elapsed. The target thread should check for and
respect interruption requests (details
).
The monitor itself can be executed as a separate thread.
Summary
Public Constructors |
|
ThreadMonitor(Thread thread, boolean started, IMonitorInfoProvider moninfo, Runnable before, Runnable after)
Create a new thread monitor instance.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
ThreadMonitor
(Thread thread, boolean started, IMonitorInfoProvider moninfo, Runnable before, Runnable after)
Create a new thread monitor instance.
Parameters
thread |
the thread to be monitored, started or not |
started |
false if the thread was not started by the caller, in which case it will be
started right before monitoring takes place |
moninfo |
information for the monitor |
before |
optional routine run before monitoring occurs |
after |
optional routine run after monitoring is done
|
Public Methods
public
Thread
getMonitoredThread
()
public
synchronized
boolean
isMonitoring
()
public
synchronized
boolean
isReady
()
public
synchronized
boolean
isTerminated
()
public
synchronized
Thread
start
(boolean blocking)