org.apache.servicemix.eip.patterns
Class ContentBasedRouter

java.lang.Object
  extended by org.apache.servicemix.common.endpoints.AbstractEndpoint
      extended by org.apache.servicemix.common.endpoints.SimpleEndpoint
          extended by org.apache.servicemix.common.endpoints.ProviderEndpoint
              extended by org.apache.servicemix.eip.EIPEndpoint
                  extended by org.apache.servicemix.eip.support.AbstractContentBasedRouter
                      extended by org.apache.servicemix.eip.patterns.ContentBasedRouter
All Implemented Interfaces:
Endpoint

public class ContentBasedRouter
extends AbstractContentBasedRouter

ContentBasedRouter can be used for all kind of content-based routing. This component implements the Content-Based Router pattern.

Version:
$Revision: 376451 $
Author:
gnodet

Field Summary
 
Fields inherited from class org.apache.servicemix.eip.EIPEndpoint
lockManager, store, storeFactory, timerManager, wsdlExchangeTarget, wsdlResource
 
Fields inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint
logger
 
Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
definition, description, endpoint, interfaceName, service, serviceUnit
 
Constructor Summary
ContentBasedRouter()
           
 
Method Summary
protected  ExchangeTarget getDestination(javax.jbi.messaging.MessageExchange exchange)
          Find the target destination for the given JBI exchange
 RoutingRule[] getRules()
           
 void setRules(RoutingRule[] rules)
          The list of routing rules.
 void validate()
           
 
Methods inherited from class org.apache.servicemix.eip.support.AbstractContentBasedRouter
isForwardOperation, processAsync, processSync, setForwardOperation
 
Methods inherited from class org.apache.servicemix.eip.EIPEndpoint
chooseFirstEndpointWithDescriptor, copyAttachments, copyProperties, getDefinition, getDefinitionFromDescription, getDefinitionFromWsdlExchangeTarget, getDefinitionFromWsdlResource, getDescription, getDescriptionForExchangeTarget, getEndpointsForExchangeTarget, getLockManager, getStore, getStoreFactory, getTimerManager, getWsdlExchangeTarget, getWsdlResource, process, setLockManager, setStore, setStoreFactory, setTimerManager, setWsdlExchangeTarget, setWsdlResource, start, stop
 
Methods inherited from class org.apache.servicemix.common.endpoints.ProviderEndpoint
activate, deactivate, getRole, processInOnly, processInOut
 
Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint
done, fail, getChannel, getContext, getExchangeFactory, send, sendSync
 
Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentBasedRouter

public ContentBasedRouter()
Method Detail

getRules

public RoutingRule[] getRules()
Returns:
Returns the rules.

setRules

public void setRules(RoutingRule[] rules)
The list of routing rules.

Parameters:
rules - The rules to set.

validate

public void validate()
              throws javax.jbi.management.DeploymentException
Specified by:
validate in interface Endpoint
Overrides:
validate in class AbstractContentBasedRouter
Throws:
javax.jbi.management.DeploymentException

getDestination

protected ExchangeTarget getDestination(javax.jbi.messaging.MessageExchange exchange)
                                 throws java.lang.Exception
Find the target destination for the given JBI exchange

Specified by:
getDestination in class AbstractContentBasedRouter
Parameters:
exchange -
Returns:
the target for the given exchange
Throws:
java.lang.Exception


Copyright © 2005-2011 FuseSource. All Rights Reserved.