org.mule.routing
Class AbstractMatchingRouter

java.lang.Object
  extended by org.mule.routing.AbstractMatchingRouter
All Implemented Interfaces:
AnnotatedObject, MessageProcessor, MatchingRouter

public class AbstractMatchingRouter
extends Object
implements MatchingRouter, AnnotatedObject

AbstractRouterCollection provides common method implementations of router collections for in and outbound routers.


Field Summary
protected  MessageProcessor defaultRoute
           
protected  Log logger
          logger used by this class
protected  List<MatchableMessageProcessor> matchableRoutes
           
protected  boolean matchAll
           
 
Fields inherited from interface org.mule.api.AnnotatedObject
PROPERTY_NAME
 
Constructor Summary
AbstractMatchingRouter()
           
 
Method Summary
 void addRoute(MatchableMessageProcessor matchable)
           
 void dispose()
           
 Object getAnnotation(QName name)
          Gets the value of specified annotation.
 Map<QName,Object> getAnnotations()
          Gets all annotations.
 MessageProcessor getDefaultRoute()
           
 List<MatchableMessageProcessor> getRoutes()
           
 void initialise()
           
 boolean isMatchAll()
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
protected  MuleEvent processDefaultRoute(MuleEvent event)
           
 void removeRoute(MatchableMessageProcessor matchable)
           
 void setAnnotations(Map<QName,Object> newAnnotations)
          Sets annotations to the object.
 void setDefaultRoute(MessageProcessor defaultRoute)
           
 void setMatchAll(boolean matchAll)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final transient Log logger
logger used by this class


matchableRoutes

protected List<MatchableMessageProcessor> matchableRoutes

matchAll

protected boolean matchAll

defaultRoute

protected MessageProcessor defaultRoute
Constructor Detail

AbstractMatchingRouter

public AbstractMatchingRouter()
Method Detail

process

public MuleEvent process(MuleEvent event)
                  throws MuleException
Description copied from interface: MessageProcessor
Invokes the MessageProcessor.

Specified by:
process in interface MessageProcessor
Parameters:
event - MuleEvent to be processed
Returns:
optional response MuleEvent
Throws:
MuleException

processDefaultRoute

protected MuleEvent processDefaultRoute(MuleEvent event)
                                 throws MuleException
Throws:
MuleException

isMatchAll

public boolean isMatchAll()

setMatchAll

public void setMatchAll(boolean matchAll)

addRoute

public void addRoute(MatchableMessageProcessor matchable)
Specified by:
addRoute in interface MatchingRouter

removeRoute

public void removeRoute(MatchableMessageProcessor matchable)
Specified by:
removeRoute in interface MatchingRouter

setDefaultRoute

public void setDefaultRoute(MessageProcessor defaultRoute)

getRoutes

public List<MatchableMessageProcessor> getRoutes()

getDefaultRoute

public MessageProcessor getDefaultRoute()

initialise

public void initialise()
                throws InitialisationException
Throws:
InitialisationException

dispose

public void dispose()

getAnnotation

public final Object getAnnotation(QName name)
Description copied from interface: AnnotatedObject
Gets the value of specified annotation.

Specified by:
getAnnotation in interface AnnotatedObject
Returns:
the value of specified annotation

getAnnotations

public final Map<QName,Object> getAnnotations()
Description copied from interface: AnnotatedObject
Gets all annotations.

Specified by:
getAnnotations in interface AnnotatedObject
Returns:
all annotation

setAnnotations

public final void setAnnotations(Map<QName,Object> newAnnotations)
Description copied from interface: AnnotatedObject
Sets annotations to the object.

Specified by:
setAnnotations in interface AnnotatedObject


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