use of com.ibm.streamsx.topology.spl.SPLWindow in project streamsx.topology by IBMStreams.
the class RestServer method viewerSpl.
private String viewerSpl(TWindow<Tuple, ?> window, String context, String name) {
assert window.getStream() instanceof SPLStream;
SPLWindow splWindow = SPLStreams.triggerCount(window, 1);
Map<String, Object> params = new HashMap<>();
params.put("port", port);
params.put("context", context);
params.put("contextResourceBase", "opt/html/" + context);
TSink tv = SPL.invokeSink(name, "com.ibm.streamsx.inet.rest::HTTPTupleView", splWindow, params);
if (firstInvocation == null)
firstInvocation = tv;
else
firstInvocation.colocate(tv);
// so currently it's always port 0.
return name + "/ports/input/0";
}
Aggregations