An example implementation of the whiteboard pattern with Java 8 and OSGi declarative services annotations.
You need an Eclipse with the Declarative Services Annotations Support Plug-In to make the annotations work.
- Import the 4 projects
- de.elinja.whiteboard.api
- de.elinja.whiteboard.numberproducer
- de.elinja.whiteboard.printer.bin
- de.elinja.whiteboard.printer.hex into your Eclipse workspace.
- In project de.elinja.whiteboard.numberproducer: Right-click WhiteboardPatternExample.launch in and select Run As WhiteboardPatternExample
The output of the sample should be
Sending no. 4711 to printers:
Hex => 1267
Bin => 1001001100111
Done.