... | ... | @@ -13,7 +13,7 @@ In order to work with TeeTime you need to make sure it is added to your project. |
|
|
- [ResultPrinter.java](https://build.se.informatik.uni-kiel.de/gitlab/teetime/teetime/blob/master/src/test/java/teetime/examples/filecounter/ResultPrinter.java)
|
|
|
- [PrintResultConfig.java](https://build.se.informatik.uni-kiel.de/gitlab/teetime/teetime/blob/master/src/test/java/teetime/examples/filecounter/PrintResultConfig.java)
|
|
|
|
|
|
### Separate dat Logic
|
|
|
### Separate that Logic
|
|
|
|
|
|
The Pipe&Filter architecture is well known for its property to divide work into disjoint steps.
|
|
|
As - for example - a car manufacturer which divides the assembly of a new car into different steps to increase efficiency and throughput, we will also follow this guideline in our work with TeeTime.
|
... | ... | @@ -30,7 +30,7 @@ The last stage will save or print the resulting number. |
|
|
|
|
|
Our mission is to implement those four stages as separate filter and connect them.
|
|
|
|
|
|
### Implement dem Stages
|
|
|
### Implement them Stages
|
|
|
|
|
|
This section will explain the implementation of the stages we need for our "File Counter".
|
|
|
If you want to dig deeper into the implementation mechanisms of the TeeTime framework, we recommend to take a look at [this tutorial](Writing-your-own-Stage).
|
... | ... | @@ -54,7 +54,7 @@ It receives elements of the type ```Integer``` and prints them to the console. |
|
|
As this is a simple consumer, ```teetime.framework.AbstractConsumerStage``` should also be used here.
|
|
|
This few lines of code may look like [this](https://build.se.informatik.uni-kiel.de/gitlab/teetime/teetime/blob/master/src/test/java/teetime/examples/filecounter/ResultPrinter.java).
|
|
|
|
|
|
### Connect dem Stages
|
|
|
### Connect them Stages
|
|
|
|
|
|
What splendid stages we have, which await to be connected.
|
|
|
Analogous to integrated circuits which are connected through their ports, we only need to connect the ports of the stages with pipes.
|
... | ... | @@ -63,7 +63,7 @@ We create instances of our three stages and connect them correctly. |
|
|
Please remember that TeeTime only supports uni-directed communication.
|
|
|
A sample solution can look like [this](https://build.se.informatik.uni-kiel.de/gitlab/teetime/teetime/blob/master/src/test/java/teetime/examples/filecounter/PrintResultConfig.java).
|
|
|
|
|
|
### Execute dat Configuration
|
|
|
### Execute that Configuration
|
|
|
|
|
|
After all the hard work you may be way to excited to go to bed yet.
|
|
|
To reap the fruits of your success you still need to execute the architecture.
|
... | ... | |