org.openstreetmap.osmosis.core.pipeline.common
Class PassiveTaskManager

java.lang.Object
  extended by org.openstreetmap.osmosis.core.pipeline.common.TaskManager
      extended by org.openstreetmap.osmosis.core.pipeline.common.PassiveTaskManager
Direct Known Subclasses:
ChangeSink05ChangeSource06Manager, ChangeSinkChangeSourceManager, ChangeSinkChangeSourceManager, ChangeSinkManager, ChangeSinkManager, ChangeSinkMultiChangeSourceManager, ChangeSinkMultiChangeSourceManager, DatasetSinkManager, DatasetSinkSourceManager, DatasetSinkSourceManager, Sink05Source06Manager, SinkDatasetSourceManager, SinkDatasetSourceManager, SinkManager, SinkManager, SinkMultiSourceManager, SinkMultiSourceManager, SinkSourceManager, SinkSourceManager

public abstract class PassiveTaskManager
extends TaskManager

This task manager implementation supports tasks that perform passive processing on data received from other tasks.

Author:
Brett Henderson

Constructor Summary
protected PassiveTaskManager(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.String> pipeArgs)
          Creates a new instance.
 
Method Summary
 void execute()
          Begins execution of the task.
 boolean waitForCompletion()
          Waits until all tasks have completed execution before returning.
 
Methods inherited from class org.openstreetmap.osmosis.core.pipeline.common.TaskManager
connect, getInputTask, getTaskId, setOutputTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PassiveTaskManager

protected PassiveTaskManager(java.lang.String taskId,
                             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.
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

execute

public void execute()
Begins execution of the task. For many sink tasks, this will not do anything. Source tasks are likely to begin execution within a new thread.

Specified by:
execute in class TaskManager

waitForCompletion

public boolean waitForCompletion()
Waits until all tasks have completed execution before returning. This is intended for source tasks that run within a separate thread, sink tasks will not do anything here.

Specified by:
waitForCompletion in class TaskManager
Returns:
True if the thread completed successfully.