Class DefaultProcessorFactory
java.lang.Object
com.tangosol.coherence.rest.util.processor.DefaultProcessorFactory
- All Implemented Interfaces:
ProcessorFactory
The default implementation of
ProcessorFactory.
This ProcessorFactory implementation is used for processors that
require a single String argument in the constructor and
require no additional configuration.
- Since:
- Coherence 3.7.1
- Author:
- par 2012.03.13
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultProcessorFactory(Class clzProcessor) Construct a DefaultProcessorFactory instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected InvocableMap.EntryProcessorcreateProcessor(String sProperty) Create and initialize a new processor instance.protected ConstructorgetConstructor(Constructor[] aCtors) Search the given constructors for a constructor that accepts aStringparameter.getProcessor(String... asArgs) Return a processor instantiated by calling a processor class constructor.
-
Constructor Details
-
DefaultProcessorFactory
Construct a DefaultProcessorFactory instance.- Parameters:
clzProcessor- the processor class
-
-
Method Details
-
getProcessor
Return a processor instantiated by calling a processor class constructor.- Specified by:
getProcessorin interfaceProcessorFactory- Parameters:
asArgs- configuration arguments- Returns:
- a processor instance
- Throws:
IllegalArgumentException- if an appropriate constructor cannot be found
-
createProcessor
Create and initialize a new processor instance.- Parameters:
sProperty- property to be handled by processor- Returns:
- a processor instance
-
getConstructor
Search the given constructors for a constructor that accepts aStringparameter. If found, return the constructor, otherwise return the public default constructor, if available.- Parameters:
aCtors- constructor array- Returns:
- default constructor
-