org.geotools.process
Class Processors

Object
  extended by FactoryFinder
      extended by Processors

public class Processors
extends FactoryFinder

Factory and utility methods for ProcessExecutor, and Process classes defined in this package.

Defines static methods used to access the application's default process factory implementations.

Author:
gdavis

Field Summary
 
Fields inherited from class FactoryFinder
EMPTY_HINTS
 
Method Summary
static void addProcessFactory(ProcessFactory factory)
          Dynamically register a new process factory into SPI
static Callable<Map<String,Object>> createCallable(Process process, Map<String,Object> input)
          Used to wrap a Process up as a Callable for use with an existing ExecutorService
static Process createProcess(Name name)
          Look up an implementation of the named process on the classpath.
static ProcessFactory createProcessFactory(Name name)
          Look up a Factory by name of a process it supports.
static Map<String,Parameter<?>> getParameterInfo(Name name)
          Look up an implementation of the named process on the classpath and describe the input parameter required.
static Set<ProcessFactory> getProcessFactories()
          Set of available ProcessFactory; each of which is responsible for one or more processes.
static Map<String,Parameter<?>> getResultInfo(Name name, Map<String,Object> parameters)
          Look up an implementation of the named process on the classpath and describe the expected results.
static ProcessExecutor newProcessExecutor(int nThreads)
           
static ProcessExecutor newProcessExecutor(int nThreads, ThreadFactory threadFactory)
           
static void removeProcessFactory(ProcessFactory factory)
          Dynamically removes a process factory from SPI.
static void reset()
          Reinitializes all static state, including the ProcessFactory service registry and reference to the last used ProcessFactory
 
Methods inherited from class FactoryFinder
mergeSystemHints
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addProcessFactory

public static void addProcessFactory(ProcessFactory factory)
Dynamically register a new process factory into SPI

Parameters:
factory -

removeProcessFactory

public static void removeProcessFactory(ProcessFactory factory)
Dynamically removes a process factory from SPI. Normally the factory has been added before via addProcessFactory(ProcessFactory)

Parameters:
factory -

getProcessFactories

public static Set<ProcessFactory> getProcessFactories()
Set of available ProcessFactory; each of which is responsible for one or more processes.

Returns:
Set of ProcessFactory

createProcessFactory

public static ProcessFactory createProcessFactory(Name name)
Look up a Factory by name of a process it supports.

Parameters:
name - Name of the Process you wish to work with
Returns:
ProcessFactory capable of creating an instanceof the named process

createProcess

public static Process createProcess(Name name)
Look up an implementation of the named process on the classpath.

Parameters:
name - Name of the Process to create
Returns:
created process

getParameterInfo

public static Map<String,Parameter<?>> getParameterInfo(Name name)
Look up an implementation of the named process on the classpath and describe the input parameter required.

Parameters:
name - Name of the Process
Returns:
Description of the parameters required

getResultInfo

public static Map<String,Parameter<?>> getResultInfo(Name name,
                                                     Map<String,Object> parameters)
Look up an implementation of the named process on the classpath and describe the expected results.

Note the expected results are generated in part by the input parameters provided; this is to allow for processes where the output is controlled by the parameters (such as choosing a greyscale or color raster product; or choosing the version of GML produced etc...).

Parameters:
name - Name of the Process
parameters -
Returns:
Description of the parameters required

createCallable

public static Callable<Map<String,Object>> createCallable(Process process,
                                                          Map<String,Object> input)
Used to wrap a Process up as a Callable for use with an existing ExecutorService


newProcessExecutor

public static ProcessExecutor newProcessExecutor(int nThreads)

newProcessExecutor

public static ProcessExecutor newProcessExecutor(int nThreads,
                                                 ThreadFactory threadFactory)

reset

public static void reset()
Reinitializes all static state, including the ProcessFactory service registry and reference to the last used ProcessFactory



Copyright © 1996-2014 Geotools. All Rights Reserved.