/**
* {@inheritDoc}
*/
@Override
public void connect(PipeTasks pipeTasks) {
Source source;
int taskSourceCount;
// Get the input task. A sink only has one input, this corresponds to
// pipe index 0.
source = (Source) getInputTask(pipeTasks, 0, Source.class);
// Cast the input feed to the correct type.
// Connect the tasks.
source.setSink(task);
// Register all the sources provided by this task as outputs.
taskSourceCount = task.getSourceCount();
for (int i = 0; i < taskSourceCount; i++) {
setOutputTask(pipeTasks, task.getSource(i), i);