... | ... | @@ -21,6 +21,8 @@ Moreover, you can access a default output port named `outputPort`. |
|
|
**Note:** You need to place a `workCompleted()` call within your `execute` method to signal the framework when your producer stage has finished its job.
|
|
|
Example producer stages are the [`InitialElementProducer`](https://build.se.informatik.uni-kiel.de/teetime/teetime/blob/master/src/main/java/teetime/stage/InitialElementProducer.java) and the [`Clock`](https://build.se.informatik.uni-kiel.de/teetime/teetime/blob/master/src/main/java/teetime/stage/Clock.java).
|
|
|
|
|
|
- Inherit from `CompositeStage`, if you want to write a stage that is composed of several other stages. Such a stage does not have its own ``execute()`` method, but delays its input port(s) to its sub stage(s).
|
|
|
|
|
|
## What Code Shall I Write?
|
|
|
You only need to implement the logics your stage should represent in the `execute()` method.
|
|
|
If you need an input or an output port, declare it as instance field by using the `createInputPort()` and `createOutputPort()` methods.
|
... | ... | @@ -31,3 +33,4 @@ The following examples will give you a short insight on how stages can be implem |
|
|
- [A simple producer stage](Producer-Stage)
|
|
|
- [A simple consumer stage](Consumer-Stage)
|
|
|
- [A consumer with multiple output ports](Multiple-OutputPorts)
|
|
|
- [A composite stage](Composite-Stage) |