|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.routing.outbound.AbstractOutboundRouter
public abstract class AbstractOutboundRouter
AbstractOutboundRouter is a base router class that tracks
statistics about message processing through the router.
| Field Summary | |
|---|---|
protected CorrelationMode |
enableCorrelation
Determines if Mule stamps outgoing message with a correlation ID or not. |
protected Log |
logger
logger used by this class |
protected static List<String> |
magicProperties
These properties are automatically propagated by Mule from inbound to outbound |
protected MuleContext |
muleContext
|
protected String |
replyTo
|
protected RouterResultsHandler |
resultsHandler
|
protected List<MessageProcessor> |
routes
|
protected TransactionConfig |
transactionConfig
|
| Fields inherited from interface org.mule.api.lifecycle.Initialisable |
|---|
PHASE_NAME |
| Fields inherited from interface org.mule.api.lifecycle.Disposable |
|---|
PHASE_NAME |
| Constructor Summary | |
|---|---|
AbstractOutboundRouter()
|
|
| Method Summary | |
|---|---|
void |
addRoute(MessageProcessor route)
Adds a new message processor to the list of routes |
void |
dispose()
A lifecycle method where implementor should free up any resources. |
CorrelationMode |
getEnableCorrelation()
|
MuleContext |
getMuleContext()
|
String |
getReplyTo()
|
RouterResultsHandler |
getResultsHandler()
|
MessageProcessor |
getRoute(String name)
|
RouterStatistics |
getRouterStatistics()
|
List<MessageProcessor> |
getRoutes()
Gets a list of MessageProcessor instances associated with this router |
TransactionConfig |
getTransactionConfig()
|
void |
initialise()
Method used to perform any initialisation work. |
boolean |
isDynamicRoutes()
Determines whether this router supports dynamic route. |
MuleEvent |
process(MuleEvent event)
Invokes the MessageProcessor. |
protected void |
propagateMagicProperties(MuleMessage in,
MuleMessage out)
Propagates a number of internal system properties to handle correlation, session, etc. |
boolean |
removeRoute(MessageProcessor route)
Removes a message processor from the list of routes |
protected abstract MuleEvent |
route(MuleEvent event)
|
protected MuleEvent |
sendRequest(MuleEvent routedEvent,
MuleMessage message,
MessageProcessor route,
boolean awaitResponse)
|
protected MuleEvent |
sendRequestEvent(MuleEvent routedEvent,
MuleMessage message,
MessageProcessor route,
boolean awaitResponse)
Send message event to destination. |
void |
setEnableCorrelation(CorrelationMode enableCorrelation)
|
void |
setEnableCorrelationAsString(String enableCorrelation)
|
void |
setMessageProcessors(List<MessageProcessor> routes)
Deprecated. |
protected void |
setMessageProperties(FlowConstruct service,
MuleMessage message,
MessageProcessor route)
|
void |
setMuleContext(MuleContext context)
|
void |
setReplyTo(String replyTo)
Sets the replyTo route for any outgoing messages. |
void |
setResultsHandler(RouterResultsHandler resultsHandler)
|
void |
setRouterStatistics(RouterStatistics stats)
|
void |
setRoutes(List<MessageProcessor> routes)
|
void |
setTransactionConfig(TransactionConfig transactionConfig)
|
| 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.Matchable |
|---|
isMatch |
| Field Detail |
|---|
protected static List<String> magicProperties
protected transient Log logger
protected List<MessageProcessor> routes
protected String replyTo
protected CorrelationMode enableCorrelation
protected TransactionConfig transactionConfig
protected RouterResultsHandler resultsHandler
protected MuleContext muleContext
| Constructor Detail |
|---|
public AbstractOutboundRouter()
| Method Detail |
|---|
public MuleEvent process(MuleEvent event)
throws MuleException
MessageProcessor
process in interface MessageProcessorevent - MuleEvent to be processed
MuleException
protected abstract MuleEvent route(MuleEvent event)
throws MessagingException
MessagingException
protected final MuleEvent sendRequest(MuleEvent routedEvent,
MuleMessage message,
MessageProcessor route,
boolean awaitResponse)
throws MuleException
MuleException
protected void setMessageProperties(FlowConstruct service,
MuleMessage message,
MessageProcessor route)
public List<MessageProcessor> getRoutes()
OutboundRouter
getRoutes in interface OutboundRouter@Deprecated public void setMessageProcessors(List<MessageProcessor> routes)
public void setRoutes(List<MessageProcessor> routes)
public void addRoute(MessageProcessor route)
MessageRouter
addRoute in interface MessageRouterroute - new destination message processorpublic boolean removeRoute(MessageProcessor route)
MessageRouter
removeRoute in interface MessageRouterroute - destination message processor to remove
public String getReplyTo()
public void setReplyTo(String replyTo)
OutboundRouter
setReplyTo in interface OutboundRouterreplyTo - route string to usepublic CorrelationMode getEnableCorrelation()
public void setEnableCorrelation(CorrelationMode enableCorrelation)
public void setEnableCorrelationAsString(String enableCorrelation)
public TransactionConfig getTransactionConfig()
public void setTransactionConfig(TransactionConfig transactionConfig)
setTransactionConfig in interface OutboundRouterpublic boolean isDynamicRoutes()
OutboundRouter
isDynamicRoutes in interface OutboundRouterpublic MessageProcessor getRoute(String name)
name - the route identifier
org.mule.api.routing.InboundRouterCollectionpublic RouterResultsHandler getResultsHandler()
public void setResultsHandler(RouterResultsHandler resultsHandler)
protected MuleEvent sendRequestEvent(MuleEvent routedEvent,
MuleMessage message,
MessageProcessor route,
boolean awaitResponse)
throws MuleException
MuleException
protected void propagateMagicProperties(MuleMessage in,
MuleMessage out)
magicProperties
public void initialise()
throws InitialisationException
InitialisableInitialisationException 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 InitialisableInitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered frompublic void dispose()
Disposable
dispose in interface Disposablepublic void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarepublic MuleContext getMuleContext()
public void setRouterStatistics(RouterStatistics stats)
setRouterStatistics in interface RouterStatisticsRecorderpublic RouterStatistics getRouterStatistics()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||