use of com.ibm.streamsx.topology.builder.BOutputPort in project streamsx.topology by IBMStreams.
the class SPL method invokeOperator.
/**
* Create an SPLStream from the invocation of an SPL operator
* that consumes a stream and produces a stream.
*
* @param name Name for the operator invocation.
* @param kind
* SPL kind of the operator to be invoked.
* @param input
* Stream that will be connected to the only input port of the
* operator
* @param outputSchema
* SPL schema of the operator's only output port.
* @param params
* Parameters for the SPL operator, ignored if it is null.
* @return SPLStream the represents the output of the operator.
*/
public static SPLStream invokeOperator(String name, String kind, SPLInput input, StreamSchema outputSchema, Map<String, ? extends Object> params) {
BOperatorInvocation op = input.builder().addSPLOperator(name, kind, params);
SourceInfo.setSourceInfo(op, SPL.class);
SPL.connectInputToOperator(input, op);
BOutputPort stream = op.addOutput(outputSchema);
return new SPLStreamImpl(input, stream);
}
Aggregations