org.mule.module.atom.routing
Class InboundFeedSplitter

java.lang.Object
  extended by org.mule.routing.AbstractRouter
      extended by org.mule.module.atom.routing.InboundFeedSplitter
All Implemented Interfaces:
MuleContextAware, Disposable, Initialisable, InboundRouter, Router

public class InboundFeedSplitter
extends AbstractRouter
implements InboundRouter

An inbound router that will split a Feed into entries. A filter can be applied to the entries to omit certain entries, the most common use of this would be to filter out entries that have already been read by using the EntryLastUpdatedFilter filter.


Field Summary
static String FEED_PROPERTY
           
protected  Log logger
          logger used by this class
 
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
InboundFeedSplitter()
           
 
Method Summary
 List<String> getAcceptedContentTypes()
           
 Filter getEntryFilter()
           
 boolean isMatch(MuleEvent muleEvent)
          Determines if the event should be processed by this router.
 MuleEvent[] process(MuleEvent muleEvent)
          A received MuleEvent is passed to this method for processing.
 void setAcceptedContentTypes(List<String> acceptedContentTypes)
           
 void setEntryFilter(Filter entryFilter)
           
 
Methods inherited from class org.mule.routing.AbstractRouter
dispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, 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.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Field Detail

logger

protected final transient Log logger
logger used by this class


FEED_PROPERTY

public static final String FEED_PROPERTY
See Also:
Constant Field Values
Constructor Detail

InboundFeedSplitter

public InboundFeedSplitter()
Method Detail

process

public MuleEvent[] process(MuleEvent muleEvent)
                    throws MessagingException
Description copied from interface: InboundRouter
A received MuleEvent is passed to this method for processing. The router can control processing by either 1. passing back a null to indicate that the router has either discarded the event of the event has been stored for further processing. A reaosn for storing the event might be that other events in it's correlation group are expected to be received. 2. Pass back an array of one or more events to be processed by the service. Often 1 event is returned, i.e. in the case of event aggregation. The router may return an array of events if a set of events have been resequenced or multiple events have been generated from a single event.

Specified by:
process in interface InboundRouter
Parameters:
muleEvent - the event received by the inbound endpoint before it is passed to the service
Returns:
null to indicate the event has been stored/destroyed or an array of events to be processed by the service
Throws:
MessagingException - if an error occurs during processing of the event

isMatch

public boolean isMatch(MuleEvent muleEvent)
                throws MessagingException
Description copied from interface: InboundRouter
Determines if the event should be processed by this router. Routers can be selectively invoked by configuing a filter on them. Usually the filter is applied to the event when calling this method. All core Mule inbound routers extend the SelectiveConsumer router.

Specified by:
isMatch in interface InboundRouter
Parameters:
muleEvent - the current event to evaluate
Returns:
true if the event should be processed by this router
Throws:
MessagingException - if the event cannot be evaluated
See Also:
SelectiveConsumer

getEntryFilter

public Filter getEntryFilter()

setEntryFilter

public void setEntryFilter(Filter entryFilter)

getAcceptedContentTypes

public List<String> getAcceptedContentTypes()

setAcceptedContentTypes

public void setAcceptedContentTypes(List<String> acceptedContentTypes)


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