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
ConstructorDescriptionDefaultProcessorFactory
(Class clzProcessor) Construct a DefaultProcessorFactory instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected InvocableMap.EntryProcessor
createProcessor
(String sProperty) Create and initialize a new processor instance.protected Constructor
getConstructor
(Constructor[] aCtors) Search the given constructors for a constructor that accepts aString
parameter.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:
getProcessor
in 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 aString
parameter. If found, return the constructor, otherwise return the public default constructor, if available.- Parameters:
aCtors
- constructor array- Returns:
- default constructor
-