public abstract class AbstractRouterCollection extends Object implements RouterCollection, MuleContextAware
AbstractRouterCollection
provides common method implementations of
router collections for in and outbound routers.Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger
logger used by this class
|
protected boolean |
matchAll |
protected MuleContext |
muleContext |
protected List |
routers |
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
AbstractRouterCollection(int type) |
Modifier and Type | Method and Description |
---|---|
void |
addRouter(Router router) |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
RouterCatchAllStrategy |
getCatchAllStrategy() |
List |
getRouters() |
RouterStatistics |
getStatistics() |
void |
initialise()
Method used to perform any initialisation work.
|
boolean |
isMatchAll() |
Router |
removeRouter(Router router) |
void |
setCatchAllStrategy(RouterCatchAllStrategy catchAllStrategy) |
void |
setMatchAll(boolean matchAll) |
void |
setMuleContext(MuleContext context) |
void |
setRouters(List routers) |
void |
setStatistics(RouterStatistics stat) |
protected final transient org.apache.commons.logging.Log logger
protected boolean matchAll
protected List routers
protected MuleContext muleContext
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic void dispose()
Disposable
dispose
in interface Disposable
public void setRouters(List routers)
setRouters
in interface RouterCollection
public void addRouter(Router router)
addRouter
in interface RouterCollection
public Router removeRouter(Router router)
removeRouter
in interface RouterCollection
public List getRouters()
getRouters
in interface RouterCollection
public RouterCatchAllStrategy getCatchAllStrategy()
getCatchAllStrategy
in interface RouterCollection
public void setCatchAllStrategy(RouterCatchAllStrategy catchAllStrategy)
setCatchAllStrategy
in interface RouterCollection
public boolean isMatchAll()
isMatchAll
in interface RouterCollection
public void setMatchAll(boolean matchAll)
setMatchAll
in interface RouterCollection
public RouterStatistics getStatistics()
getStatistics
in interface RouterCollection
public void setStatistics(RouterStatistics stat)
setStatistics
in interface RouterCollection
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.