public class SimpleProcessingComponentManager extends Object implements IProcessingComponentManager
IProcessingComponentManager that creates a new component for each processing
request.| Constructor and Description |
|---|
SimpleProcessingComponentManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Called upon disposal of the controller.
|
void |
init(IControllerContext context,
Map<String,Object> attributes,
ProcessingComponentConfiguration... configurations)
Called upon initialization of the
Controller. |
IProcessingComponent |
prepare(Class<? extends IProcessingComponent> clazz,
String id,
Map<String,Object> inputAttributes,
Map<String,Object> outputAttributes)
Prepares a component for processing.
|
void |
recycle(IProcessingComponent component,
String id)
Called after processing completed.
|
public void init(IControllerContext context, Map<String,Object> attributes, ProcessingComponentConfiguration... configurations)
IProcessingComponentManagerController.init in interface IProcessingComponentManagercontext - controller contextattributes - global initialization attributes provided to the controllerconfigurations - component configurations provided to the controllerpublic IProcessingComponent prepare(Class<? extends IProcessingComponent> clazz, String id, Map<String,Object> inputAttributes, Map<String,Object> outputAttributes)
IProcessingComponentManagerprepare in interface IProcessingComponentManagerclazz - class of the component to prepareid - Identifier of the component to prepare. May be null.inputAttributes - input attributes for all components requested to perform
processing. Both Init- and Processing-time attributes
will be provided. Managers must not modify this map.outputAttributes - storage for output attributespublic void recycle(IProcessingComponent component, String id)
IProcessingComponentManagerrecycle in interface IProcessingComponentManagercomponent - Component instance returned from IProcessingComponentManager.prepare(java.lang.Class<? extends org.carrot2.core.IProcessingComponent>, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, java.lang.Object>).id - The same identifier of the component as used in the call to
IProcessingComponentManager.prepare(java.lang.Class<? extends org.carrot2.core.IProcessingComponent>, java.lang.String, java.util.Map<java.lang.String, java.lang.Object>, java.util.Map<java.lang.String, java.lang.Object>). May be null.public void dispose()
IProcessingComponentManagerdispose in interface IProcessingComponentManager