# Class: com.pnfsoftware.jeb.util.concurrent.ThreadMonitor

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](ThreadUtil#monitor(Thread, IMonitorInfoProvider))\). The monitor itself can be executed as a separate thread.

## Constructor: ThreadMonitor
- parameter: `thread`, type: `java.lang.Thread`
- parameter: `started`, type: `boolean`
- parameter: `moninfo`, type: `com.pnfsoftware.jeb.util.concurrent.IMonitorInfoProvider`
- parameter: `before`, type: `java.lang.Runnable`
- parameter: `after`, type: `java.lang.Runnable`

Description: Create a new thread monitor instance.
parameter: thread: the thread to be monitored, started or not
parameter: started: false if the thread was not started by the caller, in which case it will be            started right before monitoring takes place
parameter: moninfo: information for the monitor
parameter: before: optional routine run before monitoring occurs
parameter: after: optional routine run after monitoring is done

## Method: getMonitoredThread
- return type: `java.lang.Thread`


## Method: getState
- return type: `com.pnfsoftware.jeb.util.concurrent.ThreadMonitor.State`


## Method: isMonitoring
- return type: `boolean`


## Method: isReady
- return type: `boolean`


## Method: isTerminated
- return type: `boolean`


## Method: start
- parameter: `blocking`, type: `boolean`
- return type: `java.lang.Thread`


