Class AThreadActor
- java.lang.Object
-
- com.g2forge.alexandria.java.concurrent.AThreadActor
-
- All Implemented Interfaces:
ICloseable
,Closeable
,AutoCloseable
- Direct Known Subclasses:
FileScanner
,FileWatcher
public abstract class AThreadActor extends Object implements ICloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AThreadActor.State
-
Field Summary
Fields Modifier and Type Field Description protected AThreadActor.State
state
protected Thread
thread
-
Constructor Summary
Constructors Constructor Description AThreadActor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
AThreadActor.State
getState()
boolean
isOpen()
AThreadActor
open()
protected abstract void
run()
protected void
shutdown()
void
waitClosed()
-
-
-
Field Detail
-
state
protected transient volatile AThreadActor.State state
-
thread
protected Thread thread
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceICloseable
-
isOpen
public boolean isOpen()
-
open
public AThreadActor open()
-
run
protected abstract void run()
-
shutdown
protected void shutdown()
-
waitClosed
public void waitClosed()
-
getState
public AThreadActor.State getState()
-
-