public class DefaultResponseRouterCollection extends AbstractRouterCollection implements ResponseRouterCollection
DefaultResponseRouterCollection
is a router that can be used to control how
the response in a request/response message flow is created. Main usecase is to
aggregate a set of asynchonous events into a single responselogger, matchAll, muleContext, routers
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
DefaultResponseRouterCollection() |
Modifier and Type | Method and Description |
---|---|
void |
addEndpoint(InboundEndpoint endpoint) |
void |
addRouter(Router router) |
InboundEndpoint |
getEndpoint(String name) |
List |
getEndpoints() |
MuleMessage |
getResponse(MuleMessage message) |
int |
getTimeout() |
boolean |
hasEndpoints() |
void |
initialise()
Method used to perform any initialisation work.
|
boolean |
isFailOnTimeout() |
boolean |
removeEndpoint(InboundEndpoint endpoint) |
ResponseRouter |
removeRouter(ResponseRouter router) |
void |
route(MuleEvent event) |
void |
setEndpoints(List endpoints) |
void |
setFailOnTimeout(boolean failOnTimeout) |
void |
setTimeout(int timeout) |
dispose, getCatchAllStrategy, getRouters, getStatistics, isMatchAll, removeRouter, setCatchAllStrategy, setMatchAll, setMuleContext, setRouters, setStatistics
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCatchAllStrategy, getRouters, getStatistics, isMatchAll, removeRouter, setCatchAllStrategy, setMatchAll, setRouters, setStatistics
dispose
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
initialise
in class AbstractRouterCollection
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdownRecoverableException
- if an error occurs that can be recovered frompublic void route(MuleEvent event) throws RoutingException
route
in interface ResponseRouterCollection
RoutingException
public MuleMessage getResponse(MuleMessage message) throws RoutingException
getResponse
in interface ResponseRouterCollection
RoutingException
public void addRouter(Router router)
addRouter
in interface RouterCollection
addRouter
in class AbstractRouterCollection
public ResponseRouter removeRouter(ResponseRouter router)
removeRouter
in interface ResponseRouterCollection
public void addEndpoint(InboundEndpoint endpoint)
addEndpoint
in interface ResponseRouterCollection
public boolean removeEndpoint(InboundEndpoint endpoint)
removeEndpoint
in interface ResponseRouterCollection
public List getEndpoints()
getEndpoints
in interface ResponseRouterCollection
public void setEndpoints(List endpoints)
setEndpoints
in interface ResponseRouterCollection
public InboundEndpoint getEndpoint(String name)
getEndpoint
in interface ResponseRouterCollection
name
- the Endpoint identifierInboundRouterCollection
public int getTimeout()
getTimeout
in interface ResponseRouterCollection
public void setTimeout(int timeout)
setTimeout
in interface ResponseRouterCollection
public boolean isFailOnTimeout()
public void setFailOnTimeout(boolean failOnTimeout)
public boolean hasEndpoints()
hasEndpoints
in interface ResponseRouterCollection
Copyright © 2003–2013 MuleSource, Inc.. All rights reserved.