20 import ca.uqac.lif.cep.Connector;
21 import ca.uqac.lif.cep.Pullable;
22 import ca.uqac.lif.cep.tmf.KeepLast;
23 import ca.uqac.lif.cep.tmf.QueueSource;
38 public static void main(String[] args)
41 QueueSource src =
new QueueSource().setEvents(1, 2, 3, 4, 5);
43 KeepLast kl =
new KeepLast();
44 Connector.connect(src, kl);
45 Pullable p = kl.getPullableOutput();
Use the KeepLast processor to keep the last event of an input stream.