20 import ca.uqac.lif.cep.Connector;
21 import ca.uqac.lif.cep.Pushable;
22 import static ca.uqac.lif.cep.Connector.INPUT;
23 import ca.uqac.lif.cep.io.Print;
24 import ca.uqac.lif.cep.tmf.Fork;
49 public static void main(String[] args)
throws InterruptedException
55 Fork fork =
new Fork(3);
61 Print p0 =
new Print().setSeparator(
"\n").setPrefix(
"P0 ");
62 Print p1 =
new Print().setSeparator(
"\n").setPrefix(
"P1 ");
63 Print p2 =
new Print().setSeparator(
"\n").setPrefix(
"P2 ");
67 Connector.connect(fork, 0, p0, INPUT);
68 Connector.connect(fork, 1, p1, INPUT);
69 Connector.connect(fork, 2, p2, INPUT);
73 Pushable p = fork.getPushableInput();
Use the Fork processor to replicate input events in multiple output streams.