public class BeanRouter extends Object implements SAXVisitAfter, Consumer, ExecutionLifecycleInitializable, ExecutionLifecycleCleanable
Constructor and Description |
---|
BeanRouter() |
BeanRouter(org.apache.camel.CamelContext camelContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
consumes(Object object)
Does this consumer consume the specified named object.
|
void |
executeExecutionLifecycleCleanup(ExecutionContext executionContext)
Cleanup the resources allocated by this resource for the specified ExecutionContext.
|
void |
executeExecutionLifecycleInitialize(ExecutionContext executionContext)
Initialize the resources allocated by this resource for the specified ExecutionContext.
|
void |
initialize() |
protected void |
sendBean(Object bean,
ExecutionContext execContext)
Send the bean to the target endpoint.
|
BeanRouter |
setBeanId(String beanId)
Set the beanId of the bean to be routed.
|
BeanRouter |
setCorrelationIdName(String correlationIdName)
Set the correlationId header name.
|
BeanRouter |
setCorrelationIdPattern(String correlationIdPattern)
Set the correlationId pattern used to generate correlationIds.
|
BeanRouter |
setToEndpoint(String toEndpoint)
Set the Camel endpoint to which the bean is to be routed.
|
void |
uninitialize() |
void |
visitAfter(SAXElement element,
ExecutionContext execContext)
Visit the supplied element after visiting its child elements.
|
public BeanRouter()
public BeanRouter(org.apache.camel.CamelContext camelContext)
@Initialize public void initialize()
public BeanRouter setBeanId(String beanId)
beanId
- the beanId to setpublic BeanRouter setToEndpoint(String toEndpoint)
toEndpoint
- the toEndpoint to setpublic BeanRouter setCorrelationIdName(String correlationIdName)
public BeanRouter setCorrelationIdPattern(String correlationIdPattern)
correlationIdPattern
- The pattern generator template.public void visitAfter(SAXElement element, ExecutionContext execContext) throws SmooksException, IOException
SAXVisitAfter
visitAfter
in interface SAXVisitAfter
element
- The SAX element being visited.execContext
- Execution context.SmooksException
- Event processing failure.IOException
- Error writing event to output writer.protected void sendBean(Object bean, ExecutionContext execContext)
bean
- The bean to be sent.execContext
- The execution context.@Uninitialize public void uninitialize()
public boolean consumes(Object object)
Consumer
Producer
that is executing
on the same element. The consumer should only return false
if it knows for
certain that it doesn't consumer the specified named object. If uncertain, it should
error on the side of saying that it does consume the object.public void executeExecutionLifecycleInitialize(ExecutionContext executionContext)
ExecutionLifecycleInitializable
executeExecutionLifecycleInitialize
in interface ExecutionLifecycleInitializable
executionContext
- The ExecutionContext.public void executeExecutionLifecycleCleanup(ExecutionContext executionContext)
ExecutionLifecycleCleanable
executeExecutionLifecycleCleanup
in interface ExecutionLifecycleCleanable
executionContext
- The ExecutionContext.Copyright © 2020. All rights reserved.