HANDLED - the type of the object handled by the component handlers.public class GCUBESequentialHandler<HANDLED> extends GCUBEComplexHandler<HANDLED> implements Lifetime<HANDLED>
GCUBEComplexHandler for handlers which chain the execution
of their component handlers. A GCUBESequentialHandler propagates
its state across the chain as a blackboard based on which component handlers may
may communicate in a decoupled fashion. For further decoupling, a GCUBESequentialHandler
recognises components which have the semantics of GCUBEHandlerConnectors and connects
them to components which immediately precede them and immediately follow them in the chain.GCUBEHandlerConnectorhandled, logger, producer| Constructor and Description |
|---|
GCUBESequentialHandler(GCUBEIHandler<? extends HANDLED>... components)
Creates an instance with a list of component handlers.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<GCUBEIHandler<? extends HANDLED>> |
connectComponents()
Invoked internally before a run to insert and configure
GCUBEHandlerConnectors before running. |
void |
run()
Executes the task implemented by the handler.
|
addHandlers, getHandlers, removeHandler, setLogger, undoclearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, getState, notify, setBlackboard, setHandled, setName, setScopeManager, setSecurityManager, setState, subscribe, unsubscribeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearBlackboard, getBlackboard, getHandled, getId, getLogger, getName, getScopeManager, getSecurityManager, setBlackboard, setHandled, setLogger, setName, setScopeManager, setSecurityManager, subscribe, undo, unsubscribepublic GCUBESequentialHandler(GCUBEIHandler<? extends HANDLED>... components)
components - the component handlers.public void run()
throws Exception
run in interface GCUBEIHandler<HANDLED>run in class GCUBEHandler<HANDLED>Exception - if the execution of the task does not complete normally.protected List<GCUBEIHandler<? extends HANDLED>> connectComponents()
GCUBEHandlerConnectors before running.
In particular, existing connectors are configured and new GCUBEHandlerConnectors are
inserted in between non-connector components.Copyright © 2015. All Rights Reserved.