org.mule.module.sxc
Class SxcFilteringOutboundRouter

java.lang.Object
  extended by org.mule.processor.AbstractMuleObjectOwner<MessageProcessor>
      extended by org.mule.processor.AbstractMessageProcessorOwner
          extended by org.mule.routing.outbound.AbstractOutboundRouter
              extended by org.mule.routing.outbound.FilteringOutboundRouter
                  extended by org.mule.module.sxc.SxcFilteringOutboundRouter
All Implemented Interfaces:
AnnotatedObject, FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable, MessageProcessor, MessageRouter, Matchable, MatchableMessageProcessor, MatchableMessageRouter, OutboundRouter, RouterStatisticsRecorder, TransformingMatchable

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
enableCorrelation, initialised, logger, magicProperties, replyTo, resultsHandler, routes, started, transactionConfig
 
Fields inherited from class org.mule.processor.AbstractMuleObjectOwner
flowConstruct, muleContext
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
SxcFilteringOutboundRouter()
           
 
Method Summary
protected  void addEventHandlers(com.envoisolutions.sxc.xpath.XPathBuilder xpathBuilder, 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
 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
addRoute, getFilter, getRoute, getTransformers, initialise, isTransformBeforeMatch, isUseTemplates, route, setTransformers, setUseTemplates
 
Methods inherited from class org.mule.routing.outbound.AbstractOutboundRouter
cloneMessage, createEventToRoute, dispose, getEnableCorrelation, getMuleContext, getOwnedMessageProcessors, getReplyTo, getResultsHandler, getRoute, getRouterStatistics, getRoutes, getTransactionConfig, isDynamicRoutes, process, propagateMagicProperties, removeRoute, sendRequest, sendRequestEvent, setEnableCorrelation, setEnableCorrelationAsString, setMessageProcessors, setMessageProperties, setReplyTo, setResultsHandler, setRouterStatistics, setRoutes, setTransactionConfig, start, stop
 
Methods inherited from class org.mule.processor.AbstractMessageProcessorOwner
getAnnotation, getAnnotations, getOwnedObjects, setAnnotations
 
Methods inherited from class org.mule.processor.AbstractMuleObjectOwner
getFlowConstruct, setFlowConstruct
 
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.construct.FlowConstructAware
setFlowConstruct
 

Constructor Detail

SxcFilteringOutboundRouter

public SxcFilteringOutboundRouter()
Method Detail

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware
Overrides:
setMuleContext in class AbstractMuleObjectOwner<MessageProcessor>

setFilter

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

addEventHandlers

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

initialize

protected void initialize()
                   throws Exception
Throws:
Exception

isMatch

public boolean isMatch(MuleMessage message)
                throws MuleException
Description copied from interface: Matchable
Determines if the event should be processed

Specified by:
isMatch in interface Matchable
Overrides:
isMatch in class FilteringOutboundRouter
Parameters:
message - the current message to evaluate
Returns:
true if the event should be processed by this router
Throws:
MuleException - if the event cannot be evaluated

testMatch

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

getXMLStreamReader

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

Parameters:
message -
Throws:
TransformerException

getNamespaces

public Map<String,String> getNamespaces()

setNamespaces

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

getCurrentMessage

public static MuleMessage getCurrentMessage()


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.