org.milyn.smooks.camel.routing
Class BeanRouterObserver

java.lang.Object
  extended by org.milyn.smooks.camel.routing.BeanRouterObserver
All Implemented Interfaces:
BeanContextLifecycleObserver

public class BeanRouterObserver
extends java.lang.Object
implements BeanContextLifecycleObserver

BeanRouterObserver is a BeanContextLifecycleObserver that will route a specified bean to the configured endpoint.

Author:
Daniel Bevenius

Constructor Summary
BeanRouterObserver(BeanRouter beanRouter, java.lang.String beanId)
          Sole contructor.
 
Method Summary
 boolean conditionsMatch(BeanContextLifecycleEvent event)
           
 void onBeanLifecycleEvent(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.
 void setConditionEvaluator(ExecutionContextExpressionEvaluator conditionEvaluator)
          Set the condition evaluator for performing the routing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanRouterObserver

public BeanRouterObserver(BeanRouter beanRouter,
                          java.lang.String beanId)
Sole contructor.

Parameters:
beanRouter - The bean router instance to be used for routing beans.
beanId - The beanId which is the beanId in the Smooks BeanContext.
Method Detail

setConditionEvaluator

public void setConditionEvaluator(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(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:
onBeanLifecycleEvent in interface BeanContextLifecycleObserver

conditionsMatch

public boolean conditionsMatch(BeanContextLifecycleEvent event)


Copyright © 2011. All Rights Reserved.