Class BeanRouterObserver
java.lang.Object
org.smooks.cartridges.camel.routing.BeanRouterObserver
- All Implemented Interfaces:
org.smooks.api.bean.lifecycle.BeanContextLifecycleObserver
public class BeanRouterObserver
extends Object
implements org.smooks.api.bean.lifecycle.BeanContextLifecycleObserver
BeanRouterObserver is a
BeanContextLifecycleObserver that will route
a specified bean to the configured endpoint.
- Author:
- Daniel Bevenius
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanconditionsMatch(org.smooks.api.bean.lifecycle.BeanContextLifecycleEvent event) voidonBeanLifecycleEvent(org.smooks.api.bean.lifecycle.BeanContextLifecycleEvent event) Will route to the endpoint if the BeanLifecycle is of type BeanLifecycle.REMOVE and the beanId is equals to the beanId that was configured for this instance.voidsetConditionEvaluator(org.smooks.api.expression.ExecutionContextExpressionEvaluator conditionEvaluator) Set the condition evaluator for performing the routing.
-
Constructor Details
-
BeanRouterObserver
Sole contructor.- Parameters:
beanRouter- The bean router instance to be used for routing beans.beanId- The beanId which is the beanId in the SmooksBeanContext.
-
-
Method Details
-
setConditionEvaluator
public void setConditionEvaluator(org.smooks.api.expression.ExecutionContextExpressionEvaluator conditionEvaluator) Set the condition evaluator for performing the routing. Used to test if the routing is to be performed based on the user configured condition.- Parameters:
conditionEvaluator- The routing condition evaluator.
-
onBeanLifecycleEvent
public void onBeanLifecycleEvent(org.smooks.api.bean.lifecycle.BeanContextLifecycleEvent event) Will route to the endpoint if the BeanLifecycle is of type BeanLifecycle.REMOVE and the beanId is equals to the beanId that was configured for this instance.- Specified by:
onBeanLifecycleEventin interfaceorg.smooks.api.bean.lifecycle.BeanContextLifecycleObserver
-
conditionsMatch
public boolean conditionsMatch(org.smooks.api.bean.lifecycle.BeanContextLifecycleEvent event)
-