|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SafeRunnable
Interface for safely runnable objects. This interface provides the basis safe control over 'active' objects, which start running (single or multiple threads) on the creation and stop when done (or when Java VM terminates or when stop is requested by the user of the object). Active entities may be also interrupted, suspended and resumed safely.
Method Summary | |
---|---|
void |
interrupt()
Interrupts sleeping or waiting inside active object. |
boolean |
isAlive()
Tests whether this active object is still alive. |
boolean |
isSuspended()
Tests whether this active object is suspended. |
void |
join()
Waits while active object is alive. |
void |
resume()
Resumes running after suspend. |
void |
stop()
Initiates safe stop operation. |
void |
suspend()
Initiates safe suspend operation. |
void |
waitSuspend()
Initiates and waits for safe suspend. |
Method Detail |
---|
void interrupt()
InterruptedException
inside thread when it is
waiting or sleeping). This method returns immediately.
void suspend()
waitSuspend()
,
resume()
,
isSuspended()
,
stop()
void waitSuspend()
suspend()
,
resume()
,
isSuspended()
void resume()
suspend()
,
waitSuspend()
,
isSuspended()
void stop()
suspend()
,
resume()
,
join()
,
isSuspended()
,
isAlive()
void join()
stop()
,
isAlive()
,
waitSuspend()
boolean isSuspended()
true
if and only if active object is suspended.suspend()
,
waitSuspend()
,
resume()
,
isAlive()
boolean isAlive()
true
if and only if active object is alive.stop()
,
join()
,
isSuspended()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |