|
Sea 0.4.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.lbl.dsd.sea.StageManager
Creates and manages a set of stages;
Contains several default factories for commonly used threading
policies. By far the most commonly used are QUEUED
,
POOLED
and DIRECT
.
Field Summary | |
static ExecutorFactory |
DIRECT
Creates and returns DirectExecutor instances. |
static ExecutorFactory |
POOLED
Creates and returns PooledExecutor instances. |
static ExecutorFactory |
QUEUED
Creates and returns QueuedExecutor instances. |
static ExecutorFactory |
THREADED
Creates and returns ThreadedExecutor instances. |
Constructor Summary | |
StageManager()
Creates an instance with the default threading policy. |
|
StageManager(ExecutorFactory executorFactory)
Creates an instance with the given threading policy. |
Method Summary | |
Stage |
addStage(Stage stage)
Adds the given stage to the set of managed stages. |
Stage |
createStage(EventHandler handler)
Creates and returns a managed stage with the given event handler. |
Stage |
createStage(String stageName,
EventHandler handler)
Creates and returns a managed stage with the given name and event handler. |
Stage |
createStage(String stageName,
EventHandler handler,
ExceptionHandler exceptionHandler)
Creates and returns a managed stage with the given name, event handler and exceptionHandler. |
Stage |
getStage(String stageName)
Returns the managed stage with the given name, or null if no such stage is currently managed. |
void |
startAll()
Starts all managed stages. |
void |
stopAll()
Stops all managed stages. |
String |
toString()
Returns a string representation of the receiver. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final ExecutorFactory DIRECT
DirectExecutor
instances.
public static final ExecutorFactory QUEUED
QueuedExecutor
instances.
public static final ExecutorFactory THREADED
ThreadedExecutor
instances.
public static final ExecutorFactory POOLED
PooledExecutor
instances.
Constructor Detail |
public StageManager()
public StageManager(ExecutorFactory executorFactory)
Method Detail |
public Stage addStage(Stage stage)
public Stage createStage(EventHandler handler)
public Stage createStage(String stageName, EventHandler handler)
public Stage createStage(String stageName, EventHandler handler, ExceptionHandler exceptionHandler)
public void startAll()
public void stopAll()
public Stage getStage(String stageName)
null
if no such stage is currently managed.
public String toString()
|
Sea 0.4.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |