18 package network.httppush;
20 import ca.uqac.lif.cep.Connector;
21 import ca.uqac.lif.cep.ProcessorException;
22 import ca.uqac.lif.cep.Pushable;
23 import ca.uqac.lif.cep.http.HttpDownstreamGateway;
24 import ca.uqac.lif.cep.http.HttpUpstreamGateway;
25 import ca.uqac.lif.cep.io.Print;
26 import ca.uqac.lif.jerrydog.RequestCallback.Method;
41 public static void main(String[] args)
throws ProcessorException, InterruptedException
44 HttpUpstreamGateway up_gateway =
45 new HttpUpstreamGateway(
"http://localhost:12144/push");
53 HttpDownstreamGateway dn_gateway =
54 new HttpDownstreamGateway(12144,
"/push", Method.POST);
59 Print print =
new Print();
60 Connector.connect(dn_gateway, print);
74 Pushable p = up_gateway.getPushableInput();
In this example, Machine A and Machine B are actually the same host; they just listen to different TC...