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.UtilityMethods;
24 import ca.uqac.lif.cep.tmf.QueueSource;
38 public static void main (String[] args)
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);
static void main(String[] args)
Pipe processors together using the Connector object.