This framework is part of a exercise in the "Software Architecture" lecture at university Basel.
The answers to the given exercise can be found in ExerciseAnswers
// Example use of our executable message in a simple workflow
FixedSender<Message<Integer, ExecutableBody<String, String>>> messageSender = new FixedSender<>(
new Message<>(0, new ExecutableBody<>(m -> {
System.out.println(m);
sender.start();
}, "this is the body")));
new ExecutingReceiver<>(messageSender.getOutput(), "Hello, World!");
messageSender.start();
Simple example of our workflow framework using Doubles.
FixedSender<Double> sender = new FixedSender<>(2.00, 3.00, 4.00, -3.5);
Multiplier times2 = new Multiplier(sender.getOutput(),2);
new PrintReceiver<>(times2.getOutput());
sender.start();
//output
4.0
6.0
8.0
-7.0
Workflow nodes for other types can easily be implemented. For instance:
public class Reverser extends Transformer<String> {
public Reverser(Output<String> input){
super(input);
}
@Override
protected String transform(String value) {
return new StringBuilder(value).reverse().toString();
}
}
More elaborate example can be found in main
To run the program java 8 is required.
This framework is mostly barebones at the moment so dont expect too much functionality.
- Java 8 - Java Language JDK version 8
- Isabel Geissmann - isabelge
- Jannik Jaberg - cptunderground
- Rik de Graaff - overacter
- David Lengweiler - datomo
This project is licensed under the MIT License - see the LICENSE.md file for details