public class DefaultProcessorFactory extends Object implements ProcessorFactory
ProcessorFactory that supports using 3rd party Camel components to implement the EIP Processor.
The component should use the FactoryFinder SPI to specify a file with the name of the EIP model in the
directory of RESOURCE_PATH. The file should contain a property with key class that refers
to the name of the ProcessorFactory the Camel component implement, which gets called for creating
the Processors for the EIP.
The Hystrix EIP is such an example where HystrixDefinition is implemented
in the camel-hystrix component.| Modifier and Type | Field and Description |
|---|---|
static String |
RESOURCE_PATH |
| Constructor and Description |
|---|
DefaultProcessorFactory() |
| Modifier and Type | Method and Description |
|---|---|
Processor |
createChildProcessor(RouteContext routeContext,
ProcessorDefinition<?> definition,
boolean mandatory)
Creates the child processor.
|
Processor |
createProcessor(RouteContext routeContext,
ProcessorDefinition<?> definition)
Creates the processor.
|
public static final String RESOURCE_PATH
public DefaultProcessorFactory()
public Processor createChildProcessor(RouteContext routeContext, ProcessorDefinition<?> definition, boolean mandatory) throws Exception
ProcessorFactorycreateChildProcessor in interface ProcessorFactoryrouteContext - the route contextdefinition - the definition which represents the processormandatory - whether or not the child is mandatoryException - can be thrown if error creating the processorpublic Processor createProcessor(RouteContext routeContext, ProcessorDefinition<?> definition) throws Exception
ProcessorFactorycreateProcessor in interface ProcessorFactoryrouteContext - the route contextdefinition - the definition which represents the processorException - can be thrown if error creating the processorApache Camel