|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.datamanager.kernel.Simpleton
|
+--org.datamanager.tools.kernelproxy.InterfaceWorker
An abstract class that can be used to interact with the kernel. An InterfaceWorker is a Simpleton (so it has a kernel thread) that can cause events in the kernel. Essentially, a new InterfaceWorker is created. Its contents must be registered by the user, so that the thread is run. The results of the operation be then be retrieved through a get() method call. example: AddEntityWorker worker = new AddEntityWorker(entity); registerWorker(worker); Object value = worker.get();
Simpleton,
KernelProxy| Nested Class Summary |
| Nested classes inherited from class org.datamanager.kernel.Simpleton |
Simpleton.Information, Simpleton.Priority |
| Constructor Summary | |
InterfaceWorker()
Starts a thread that will call the construct method
and then exit. |
|
| Method Summary | |
protected abstract Object |
construct()
Computes the value to be returned by the get method. |
Object |
get()
Returns the value created by the construct method. |
Simpleton.Information |
getInformation()
Reports Simpleton.Information about this Simpleton. |
protected Object |
getValue()
Gets the value produced by the worker thread, or null if it hasn't been constructed yet. |
void |
process()
Calls construct() in the subclasses. |
| Methods inherited from class org.datamanager.kernel.Simpleton |
clone, getPriority, setInformation, setPriority, start |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public InterfaceWorker()
construct method
and then exit.
| Method Detail |
protected Object getValue()
protected abstract Object construct()
throws DataManagerException
get method.
DataManagerExceptionpublic Object get()
construct method.
Returns null if either the constructing thread or
the current thread was interrupted before a value was produced.
public void process()
process in class Simpletonpublic Simpleton.Information getInformation()
Simpleton
getInformation in class Simpleton
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||