20 import ca.uqac.lif.cep.Connector;
21 import ca.uqac.lif.cep.Pullable;
22 import ca.uqac.lif.cep.tmf.QueueSource;
23 import ca.uqac.lif.cep.util.Lists;
49 public static void main(String[] args)
52 QueueSource src1 =
new QueueSource();
53 src1.setEvents(3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5);
54 QueueSource src2 =
new QueueSource();
55 src2.setEvents(
false,
true,
false,
false,
false,
true,
false,
true);
56 Lists.Pack pack =
new Lists.Pack();
57 Connector.connect(src1, 0, pack, 0);
58 Connector.connect(src2, 0, pack, 1);
59 Lists.Unpack unpack =
new Lists.Unpack();
60 Connector.connect(pack, 0, unpack, 0);
61 Pullable p = unpack.getPullableOutput();
62 for (
int i = 0; i < 6; i++)
64 System.out.println(p.pull());
See the effect of chaining a Pack processor to an Unpack processor.