org.mule.module.sxc
Class SxcFilteringOutboundRouter

java.lang.Object
  extended by org.mule.routing.AbstractRouter
      extended by org.mule.routing.outbound.AbstractOutboundRouter
          extended by org.mule.routing.outbound.FilteringOutboundRouter
              extended by org.mule.module.sxc.SxcFilteringOutboundRouter
All Implemented Interfaces:
MuleContextAware, Disposable, Initialisable, OutboundRouter, Router

public class SxcFilteringOutboundRouter
extends FilteringOutboundRouter

FilteringRouter is a router that accepts events based on a filter set.


Field Summary
 
Fields inherited from class org.mule.routing.outbound.FilteringOutboundRouter
expressionManager
 
Fields inherited from class org.mule.routing.outbound.AbstractOutboundRouter
ENABLE_CORRELATION_ALWAYS, ENABLE_CORRELATION_IF_NOT_SET, ENABLE_CORRELATION_NEVER, enableCorrelation, endpoints, logger, messageInfoMapping, replyTo, resultsHandler, transactionConfig
 
Fields inherited from class org.mule.routing.AbstractRouter
muleContext
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
SxcFilteringOutboundRouter()
           
 
Method Summary
protected  void addEventHandlers(com.envoisolutions.sxc.xpath.XPathBuilder builder, Filter filter)
           
static MuleMessage getCurrentMessage()
           
 Map<String,String> getNamespaces()
           
protected  ReversibleXMLStreamReader getXMLStreamReader(MuleMessage message)
          Gets an XMLStreamReader for this message.
protected  void initialize()
           
 boolean isMatch(MuleMessage message)
          Determines if the event should be processed by this router.
 void setFilter(Filter filter)
           
 void setMuleContext(MuleContext context)
           
 void setNamespaces(Map<String,String> namespaces)
           
 boolean testMatch(MuleMessage message)
           
 
Methods inherited from class org.mule.routing.outbound.FilteringOutboundRouter
addEndpoint, getEndpoint, getFilter, getTransformers, initialise, isRequiresNewMessage, isUseTemplates, route, setTransformers, setUseTemplates
 
Methods inherited from class org.mule.routing.outbound.AbstractOutboundRouter
createTransactionTemplate, dispatch, getEnableCorrelation, getEndpoint, getEndpoints, getMessageInfoMapping, getReplyTo, getResultsHandler, getTransactionConfig, isDynamicEndpoints, removeEndpoint, send, setEnableCorrelation, setEnableCorrelationAsString, setEndpoints, setMessageInfoMapping, setMessageProperties, setReplyTo, setResultsHandler, setTransactionConfig
 
Methods inherited from class org.mule.routing.AbstractRouter
dispose, getMuleContext, getRouterStatistics, setRouterStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.api.routing.Router
getRouterStatistics, setRouterStatistics
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Constructor Detail

SxcFilteringOutboundRouter

public SxcFilteringOutboundRouter()
Method Detail

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware
Overrides:
setMuleContext in class AbstractRouter

setFilter

public void setFilter(Filter filter)
Overrides:
setFilter in class FilteringOutboundRouter

addEventHandlers

protected void addEventHandlers(com.envoisolutions.sxc.xpath.XPathBuilder builder,
                                Filter filter)

initialize

protected void initialize()
                   throws Exception
Throws:
Exception

isMatch

public boolean isMatch(MuleMessage message)
                throws RoutingException
Description copied from interface: OutboundRouter
Determines if the event should be processed by this router. Routers can be selectively invoked by configuring a filter on them. Usually the filter is applied to the message when calling this method. All core Mule outbound routers extend the FilteringOutboundRouter router that handles this method automatically.

Specified by:
isMatch in interface OutboundRouter
Overrides:
isMatch in class FilteringOutboundRouter
Parameters:
message - the current message to evaluate
Returns:
true if the event should be processed by this router
Throws:
RoutingException
See Also:
SelectiveConsumer

testMatch

public boolean testMatch(MuleMessage message)
                  throws RoutingException
Throws:
RoutingException

getXMLStreamReader

protected ReversibleXMLStreamReader getXMLStreamReader(MuleMessage message)
                                                throws TransformerException
Gets an XMLStreamReader for this message.

Parameters:
message -
Returns:
Throws:
TransformerException

getNamespaces

public Map<String,String> getNamespaces()

setNamespaces

public void setNamespaces(Map<String,String> namespaces)

getCurrentMessage

public static MuleMessage getCurrentMessage()


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.