Pipe processors together using the Connector object.
More...
|
static void | main (String[] args) |
|
Pipe processors together using the Connector object.
The chain of processors in this example can be represented graphically as:
- See also
- PipingBinary
- Author
- Sylvain Hallé Easy
Definition at line 36 of file PipingUnary.java.
◆ main()
static void basic.PipingUnary.main |
( |
String [] |
args | ) |
|
|
static |
Create a source of arbitrary numbers
Definition at line 38 of file PipingUnary.java.
41 QueueSource source =
new QueueSource();
42 source.setEvents(1, 2, 3, 4, 5, 6);
46 Doubler doubler =
new Doubler();
56 Connector.connect(source, doubler);
60 Pullable p = doubler.getPullableOutput();
61 for (
int i = 0; i < 8; i++)
63 int x = (Integer) p.pull();
64 System.out.println(
"The event is: " + x);
66 UtilityMethods.pause(1000);
The documentation for this class was generated from the following file: