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

java.lang.Object
  extended by org.openstreetmap.osmosis.core.pipeline.common.TaskManagerFactoryRegister

public class TaskManagerFactoryRegister
extends java.lang.Object

Maintains the set of task manager factories each identified by one or more unique names. This allows a pipeline to be configured dynamically such as from a user provided command line.

Author:
Brett Henderson

Constructor Summary
TaskManagerFactoryRegister()
          Creates a new instance.
 
Method Summary
 TaskManagerFactory getInstance(java.lang.String taskType)
          Get a task manager factory from the register.
 void register(java.lang.String taskType, TaskManagerFactory factory)
          Registers a new factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskManagerFactoryRegister

public TaskManagerFactoryRegister()
Creates a new instance.

Method Detail

register

public void register(java.lang.String taskType,
                     TaskManagerFactory factory)
Registers a new factory.

Parameters:
taskType - The name the factory is identified by.
factory - The factory to be registered.

getInstance

public TaskManagerFactory getInstance(java.lang.String taskType)
Get a task manager factory from the register.

Parameters:
taskType - The type of task requiring a factory.
Returns:
The factory instance.