Class DefaultProcessorFactory
- java.lang.Object
-
- com.tangosol.coherence.rest.util.processor.DefaultProcessorFactory
-
- All Implemented Interfaces:
ProcessorFactory
public class DefaultProcessorFactory extends Object implements ProcessorFactory
The default implementation ofProcessorFactory
.This
ProcessorFactory
implementation is used for processors that require a singleString
argument in the constructor and require no additional configuration.- Since:
- Coherence 3.7.1
- Author:
- par 2012.03.13
-
-
Constructor Summary
Constructors Constructor Description DefaultProcessorFactory(Class clzProcessor)
Construct a DefaultProcessorFactory instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.InvocableMap.EntryProcessor
getProcessor(String... asArgs)
Return a processor instantiated by calling a processor class constructor.
-
-
-
Constructor Detail
-
DefaultProcessorFactory
public DefaultProcessorFactory(Class clzProcessor)
Construct a DefaultProcessorFactory instance.- Parameters:
clzProcessor
- the processor class
-
-
Method Detail
-
getProcessor
public InvocableMap.EntryProcessor getProcessor(String... asArgs)
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
protected InvocableMap.EntryProcessor createProcessor(String sProperty)
Create and initialize a new processor instance.- Parameters:
sProperty
- property to be handled by processor- Returns:
- a processor instance
-
getConstructor
protected Constructor getConstructor(Constructor[] aCtors)
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
-
-