20 import ca.uqac.lif.cep.Connector;
21 import ca.uqac.lif.cep.Pullable;
22 import ca.uqac.lif.cep.tmf.Fork;
23 import ca.uqac.lif.cep.tmf.QueueSource;
46 public static void main(String[] args)
throws InterruptedException
49 QueueSource source =
new QueueSource().setEvents(1, 2, 3, 4, 5);
55 Fork fork =
new Fork(2);
56 Connector.connect(source, fork);
59 Pullable p0 = fork.getPullableOutput(0);
60 Pullable p1 = fork.getPullableOutput(1);
63 System.out.println(
"Output from p0: " + p0.pull());
69 System.out.println(
"Output from p1: " + p1.pull());
77 System.out.println(
"Output from p0: " + p0.pull());
78 System.out.println(
"Output from p0: " + p0.pull());
79 System.out.println(
"Output from p1: " + p1.pull());
80 System.out.println(
"Output from p0: " + p0.pull());
81 System.out.println(
"Output from p1: " + p1.pull());
static void main(String[] args)
Use the Fork processor to replicate input events in multiple output streams.