org.mule.routing.outbound
Class AbstractOutboundRouter

java.lang.Object
  extended by org.mule.routing.AbstractRouter
      extended by org.mule.routing.outbound.AbstractOutboundRouter
All Implemented Interfaces:
UMOOutboundRouter, UMORouter
Direct Known Subclasses:
FilteringOutboundRouter, TransformerRouter

public abstract class AbstractOutboundRouter
extends AbstractRouter
implements UMOOutboundRouter

AbstractOutboundRouter is a base router class that tracks statistics about message processing through the router.


Field Summary
static int ENABLE_CORRELATION_ALWAYS
           
static int ENABLE_CORRELATION_IF_NOT_SET
           
static int ENABLE_CORRELATION_NEVER
           
protected  int enableCorrelation
           
protected  List endpoints
           
protected  Log logger
          logger used by this class
protected  PropertyExtractor propertyExtractor
           
protected  String replyTo
           
protected  UMOTransactionConfig transactionConfig
           
 
Constructor Summary
AbstractOutboundRouter()
           
 
Method Summary
 void addEndpoint(UMOEndpoint endpoint)
          Adds an endpoint to this router
 void dispatch(UMOSession session, UMOMessage message, UMOEndpoint endpoint)
           
 int getEnableCorrelation()
           
 List getEndpoints()
          Gets a list of UMOEndpoint instances associated with this router
 PropertyExtractor getPropertyExtractor()
           
 String getReplyTo()
          Gets the replyTo endpoint for any outgoing messages.
 UMOTransactionConfig getTransactionConfig()
           
 boolean isDynamicEndpoints()
          Determines whether this router supports dynamic endpoint.
 boolean removeEndpoint(UMOImmutableEndpoint endpoint)
          Removes a specific endpoint from the router
 UMOMessage send(UMOSession session, UMOMessage message, UMOEndpoint endpoint)
           
 void setEnableCorrelation(int enableCorrelation)
           
 void setEnableCorrelationAsString(String enableCorrelation)
           
 void setEndpoints(List endpoints)
          Sets a list of UMOEndpoint instances associated with this router
protected  void setMessageProperties(UMOSession session, UMOMessage message, UMOEndpoint endpoint)
           
 void setPropertyExtractor(PropertyExtractor propertyExtractor)
           
 void setPropertyExtractorAsString(String className)
           
 void setReplyTo(String replyTo)
          Sets the replyTo endpoint for any outgoing messages.
 void setTransactionConfig(UMOTransactionConfig transactionConfig)
           
 
Methods inherited from class org.mule.routing.AbstractRouter
getRouterStatistics, setRouterStatistics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.umo.routing.UMOOutboundRouter
isMatch, route
 
Methods inherited from interface org.mule.umo.routing.UMORouter
getRouterStatistics, setRouterStatistics
 

Field Detail

ENABLE_CORRELATION_IF_NOT_SET

public static final int ENABLE_CORRELATION_IF_NOT_SET
See Also:
Constant Field Values

ENABLE_CORRELATION_ALWAYS

public static final int ENABLE_CORRELATION_ALWAYS
See Also:
Constant Field Values

ENABLE_CORRELATION_NEVER

public static final int ENABLE_CORRELATION_NEVER
See Also:
Constant Field Values

logger

protected transient Log logger
logger used by this class


endpoints

protected List endpoints

replyTo

protected String replyTo

enableCorrelation

protected int enableCorrelation

propertyExtractor

protected PropertyExtractor propertyExtractor

transactionConfig

protected UMOTransactionConfig transactionConfig
Constructor Detail

AbstractOutboundRouter

public AbstractOutboundRouter()
Method Detail

dispatch

public void dispatch(UMOSession session,
                     UMOMessage message,
                     UMOEndpoint endpoint)
              throws UMOException
Throws:
UMOException

send

public UMOMessage send(UMOSession session,
                       UMOMessage message,
                       UMOEndpoint endpoint)
                throws UMOException
Throws:
UMOException

setMessageProperties

protected void setMessageProperties(UMOSession session,
                                    UMOMessage message,
                                    UMOEndpoint endpoint)

getEndpoints

public List getEndpoints()
Description copied from interface: UMOOutboundRouter
Gets a list of UMOEndpoint instances associated with this router

Specified by:
getEndpoints in interface UMOOutboundRouter
Returns:
a list of UMOEndpoint instances

setEndpoints

public void setEndpoints(List endpoints)
Description copied from interface: UMOOutboundRouter
Sets a list of UMOEndpoint instances associated with this router

Specified by:
setEndpoints in interface UMOOutboundRouter
Parameters:
endpoints - a list of UMOEndpoint instances

addEndpoint

public void addEndpoint(UMOEndpoint endpoint)
Description copied from interface: UMOOutboundRouter
Adds an endpoint to this router

Specified by:
addEndpoint in interface UMOOutboundRouter
Parameters:
endpoint - the endpoint to add to the router

removeEndpoint

public boolean removeEndpoint(UMOImmutableEndpoint endpoint)
Description copied from interface: UMOOutboundRouter
Removes a specific endpoint from the router

Specified by:
removeEndpoint in interface UMOOutboundRouter
Parameters:
endpoint - the endpoint to remove
Returns:
true if the endpoint was removed

getReplyTo

public String getReplyTo()
Description copied from interface: UMOOutboundRouter
Gets the replyTo endpoint for any outgoing messages. This will then be used by other Mule routers to send replies back for this message. If the underlying protocol supports replyTo messages, such as Jms, a Jms Destination will be attached to the outbound message

Specified by:
getReplyTo in interface UMOOutboundRouter
Returns:
the replyTo endpoint or null if one has not been set.

setReplyTo

public void setReplyTo(String replyTo)
Description copied from interface: UMOOutboundRouter
Sets the replyTo endpoint for any outgoing messages. This will then be used by other Mule routers to send replies back for this message. If the underlying protocol supports replyTo messages, such as Jms, a Jms Destination will be attached to the outbound message

Specified by:
setReplyTo in interface UMOOutboundRouter
Parameters:
replyTo - endpoint string to use

getEnableCorrelation

public int getEnableCorrelation()

setEnableCorrelation

public void setEnableCorrelation(int enableCorrelation)

setEnableCorrelationAsString

public void setEnableCorrelationAsString(String enableCorrelation)

getPropertyExtractor

public PropertyExtractor getPropertyExtractor()

setPropertyExtractor

public void setPropertyExtractor(PropertyExtractor propertyExtractor)

setPropertyExtractorAsString

public void setPropertyExtractorAsString(String className)

getTransactionConfig

public UMOTransactionConfig getTransactionConfig()
Specified by:
getTransactionConfig in interface UMOOutboundRouter

setTransactionConfig

public void setTransactionConfig(UMOTransactionConfig transactionConfig)
Specified by:
setTransactionConfig in interface UMOOutboundRouter

isDynamicEndpoints

public boolean isDynamicEndpoints()
Description copied from interface: UMOOutboundRouter
Determines whether this router supports dynamic endpoint. i.e. endpoints that are not configured at design time. Endpoints might be pulled from the message or payload.

Specified by:
isDynamicEndpoints in interface UMOOutboundRouter
Returns:


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.