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 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 Details

    • DefaultProcessorFactory

      public DefaultProcessorFactory(Class clzProcessor)
      Construct a DefaultProcessorFactory instance.
      Parameters:
      clzProcessor - the processor class
  • Method Details

    • getProcessor

      public InvocableMap.EntryProcessor getProcessor(String... asArgs)
      Return a processor instantiated by calling a processor class constructor.
      Specified by:
      getProcessor in interface ProcessorFactory
      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 a String parameter. If found, return the constructor, otherwise return the public default constructor, if available.
      Parameters:
      aCtors - constructor array
      Returns:
      default constructor