public interface ProcessorFactory
Processor
based on the definition
.
This allows you to implement a custom factory in which you can control the creation of the processors. It also allows
you to manipulate the definition
s for example to configure or
change options. Its also possible to add new steps in the route by adding outputs to
definition
s.
Important: A custom ProcessorFactory should extend the default implementation
org.apache.camel.processor.DefaultProcessorFactory and in the overridden methods, super should be called to
let the default implementation create the processor when custom processors is not created.Modifier and Type | Field and Description |
---|---|
static String |
FACTORY
Service factory key.
|
Modifier and Type | Method and Description |
---|---|
Processor |
createChildProcessor(Route route,
NamedNode definition,
boolean mandatory)
Creates the child processor.
|
Processor |
createProcessor(CamelContext camelContext,
String definitionName,
Object[] args)
Creates a processor by the name of the definition.
|
Processor |
createProcessor(Route route,
NamedNode definition)
Creates the processor.
|
static final String FACTORY
Processor createChildProcessor(Route route, NamedNode definition, boolean mandatory) throws Exception
route
- the route contextdefinition
- the definition which represents the processormandatory
- whether or not the child is mandatoryException
- can be thrown if error creating the processorProcessor createProcessor(Route route, NamedNode definition) throws Exception
route
- the route contextdefinition
- the definition which represents the processorException
- can be thrown if error creating the processorProcessor createProcessor(CamelContext camelContext, String definitionName, Object[] args) throws Exception
camelContext
- the camel contextdefinitionName
- the name of the definition that represents the processorargs
- arguments for creating the processor (optimized to use fixed order of parameters)Exception
- can be thrown if error creating the processorApache Camel