org.openstreetmap.osmosis.core.pipeline.v0_6
Class RunnableDatasetSourceManager

java.lang.Object
  extended by org.openstreetmap.osmosis.core.pipeline.common.TaskManager
      extended by org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager
          extended by org.openstreetmap.osmosis.core.pipeline.v0_6.RunnableDatasetSourceManager

public class RunnableDatasetSourceManager
extends ActiveTaskManager

A task manager implementation for RunnableDatasetSource task implementations.

Author:
Brett Henderson

Constructor Summary
RunnableDatasetSourceManager(java.lang.String taskId, RunnableDatasetSource task, java.util.Map<java.lang.String,java.lang.String> pipeArgs)
          Creates a new instance.
 
Method Summary
 void connect(PipeTasks pipeTasks)
          Connects the task to any input tasks based upon the pipes created by source tasks, and makes any output pipes available to be used by subsequent sink tasks.
protected  java.lang.Runnable getTask()
          Returns the runnable task managed by this manager.
 
Methods inherited from class org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager
execute, waitForCompletion
 
Methods inherited from class org.openstreetmap.osmosis.core.pipeline.common.TaskManager
getInputTask, getTaskId, setOutputTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunnableDatasetSourceManager

public RunnableDatasetSourceManager(java.lang.String taskId,
                                    RunnableDatasetSource task,
                                    java.util.Map<java.lang.String,java.lang.String> pipeArgs)
Creates a new instance.

Parameters:
taskId - A unique identifier for the task. This is used to produce meaningful errors when errors occur.
task - The task instance to be managed.
pipeArgs - The arguments defining input and output pipes for the task, pipes are a logical concept for identifying how the tasks are connected together.
Method Detail

connect

public void connect(PipeTasks pipeTasks)
Connects the task to any input tasks based upon the pipes created by source tasks, and makes any output pipes available to be used by subsequent sink tasks.

Specified by:
connect in class TaskManager
Parameters:
pipeTasks - The currently registered pipe tasks. This will be modified to remove any consumed inputs, and modified to add new outputs.

getTask

protected java.lang.Runnable getTask()
Returns the runnable task managed by this manager.

Specified by:
getTask in class ActiveTaskManager
Returns:
The task.