20 import ca.uqac.lif.cep.Connector;
21 import ca.uqac.lif.cep.Doubler;
22 import ca.uqac.lif.cep.Pullable;
23 import ca.uqac.lif.cep.tmf.QueueSource;
40 public static void main (String[] args)
43 QueueSource source =
new QueueSource();
44 source.setEvents(1, 2, 3, 4, 5, 6);
48 Doubler doubler =
new Doubler();
58 Connector.connect(source, doubler);
63 Pullable p = doubler.getPullableOutput();
64 System.out.println(
"The event is: " + p.pull());
65 System.out.println(
"The event is: " + p.pull());
66 Pullable p2 = source.getPullableOutput();
67 System.out.println(
"The event is: " + p2.pull());
68 System.out.println(
"The event is: " + p.pull());
Pipe processors together using the Connector object.