BLOCKED - The thread is blocked, which means that it is
waiting for access to
a synchronized code.
NEW - The thread has been created, but its start( ) method has not yet been called.
RUNNABLE - The thread is either currently executing or will execute as soon as it gets access to the CPU.
TERMINATED - The thread has ended. A thread ends when its run( ) method returns,
or when the thread is stopped via a call to stop( ). (Note that stop( ) is deprecated and should not be used.)
TIMED_WAITING - The thread is suspended, waiting on another thread for a specific period of time. This can occur because of a call to the timeout versions of sleep( ), wait( ), or join( ), for example.
WAITING - The thread is suspended, waiting on another thread. This can occur because of a call to the non-timeout versions of wait( ) or join( ),
for example.
Наблюдение за состоянием потока
getState()