Package org.apache.camel.spi
Interface ProcessorFactory
public interface ProcessorFactory
A factory to create
.
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
s for example to configure or
change options. Its also possible to add new steps in the route by adding outputs to
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.
Processor
based on the
invalid reference
definition
invalid reference
definition
invalid reference
definition
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateChildProcessor
(Route route, NamedNode definition, boolean mandatory) Creates the child processor.createProcessor
(CamelContext camelContext, String definitionName, Object[] args) Creates a processor by the name of the definition.createProcessor
(Route route, NamedNode definition) Creates the processor.
-
Field Details
-
FACTORY
Service factory key.- See Also:
-
-
Method Details
-
createChildProcessor
Processor createChildProcessor(Route route, NamedNode definition, boolean mandatory) throws Exception Creates the child processor. The child processor is an output from the given definition, for example the sub route in a splitter EIP.- Parameters:
route
- the route contextdefinition
- the definition which represents the processormandatory
- whether or not the child is mandatory- Returns:
- the created processor, or null to let the default implementation in Camel create the processor.
- Throws:
Exception
- can be thrown if error creating the processor
-
createProcessor
Creates the processor.- Parameters:
route
- the route contextdefinition
- the definition which represents the processor- Returns:
- the created processor, or null to let the default implementation in Camel create the processor.
- Throws:
Exception
- can be thrown if error creating the processor
-
createProcessor
Processor createProcessor(CamelContext camelContext, String definitionName, Object[] args) throws Exception Creates a processor by the name of the definition. This should only be used in some special situations where the processor is used internally by Camel itself and some component such as camel-cloud, camel-seda.- Parameters:
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)- Returns:
- the created processor, or null if this situation is not yet implemented.
- Throws:
Exception
- can be thrown if error creating the processor
-