|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StageContext
This interface represents the context in which a stage is run. Ordinarily, the context will be provided by the pipeline in which the stage is embedded; however, this interface is also useful for creating isolated test environments in which a stage can be run.
Method Summary | |
---|---|
Feeder |
getBranchFeeder(String branch)
Return the source feeder for the specified pipeline branch. |
Feeder |
getDownstreamFeeder(Stage stage)
This method is used by a stage driver to pass data from one stage to the next. |
Object |
getEnv(String key)
A StageContext implementation provides a global environment for the stages being run. |
Collection<StageEventListener> |
getRegisteredListeners()
Returns the collection of StageEventListener s registered with the
context. |
void |
raise(EventObject ev)
Notifies each registered listener of an event and propagates the event to any attached branches |
void |
registerListener(StageEventListener listener)
Adds a StageEventListener to the context that will be notified by calls
to raise(EventObject) . |
Method Detail |
---|
void registerListener(StageEventListener listener)
StageEventListener
to the context that will be notified by calls
to raise(EventObject)
.
listener
- The listener to be registered with the context.Collection<StageEventListener> getRegisteredListeners()
StageEventListener
s registered with the
context.
StageEventListener
s registered with the
context.void raise(EventObject ev)
ev
- The event to be passed to registered listenersFeeder getBranchFeeder(String branch)
branch
- the string identifer of the branch for which a feeder will be retrieved
Feeder
for the first stage of the specified branchFeeder getDownstreamFeeder(Stage stage)
stage
- The stage from which "downstream" will be determined. Ordinarily a Stage implementation
will call this method with a reference to itself.
Feeder.VOID
if no downstream
stage exists.Object getEnv(String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |