public class AbstractMatchingRouter extends Object implements MatchingRouter, AnnotatedObject
AbstractRouterCollection
provides common method implementations of router collections for in
and outbound routers.Modifier and Type | Field and Description |
---|---|
protected MessageProcessor |
defaultRoute |
protected Log |
logger
logger used by this class
|
protected List<MatchableMessageProcessor> |
matchableRoutes |
protected boolean |
matchAll |
PROPERTY_NAME
Constructor and Description |
---|
AbstractMatchingRouter() |
Modifier and Type | Method and Description |
---|---|
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) |
protected final transient Log logger
protected List<MatchableMessageProcessor> matchableRoutes
protected boolean matchAll
protected MessageProcessor defaultRoute
public MuleEvent process(MuleEvent event) throws MuleException
MessageProcessor
process
in interface MessageProcessor
event
- MuleEvent to be processedMuleException
protected MuleEvent processDefaultRoute(MuleEvent event) throws MuleException
MuleException
public boolean isMatchAll()
public void setMatchAll(boolean matchAll)
public void addRoute(MatchableMessageProcessor matchable)
addRoute
in interface MatchingRouter
public void removeRoute(MatchableMessageProcessor matchable)
removeRoute
in interface MatchingRouter
public void setDefaultRoute(MessageProcessor defaultRoute)
public List<MatchableMessageProcessor> getRoutes()
public MessageProcessor getDefaultRoute()
public void initialise() throws InitialisationException
InitialisationException
public void dispose()
public final Object getAnnotation(QName name)
AnnotatedObject
getAnnotation
in interface AnnotatedObject
public final Map<QName,Object> getAnnotations()
AnnotatedObject
getAnnotations
in interface AnnotatedObject
public final void setAnnotations(Map<QName,Object> newAnnotations)
AnnotatedObject
setAnnotations
in interface AnnotatedObject
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.