AbstractOutboundRouter (Mule ESB 2.2.1 API)
Keywords: org.mule.routing.outbound.AbstractOutboundRouter class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.routing.outbound
Class AbstractOutboundRouter

    java.lang.Object
      org.mule.routing.AbstractRouter
          org.mule.routing.outbound.AbstractOutboundRouter

All Implemented Interfaces:
  MuleContextAware, Disposable, Initialisable, OutboundRouter, Router

Direct Known Subclasses:
  FilteringOutboundRouter, TransformerRouter

    public abstract class AbstractOutboundRouter

extends AbstractRouter
implements OutboundRouter

`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` Determines if Mule stamps outgoing message with a correlation ID or not.
`protected List` | `endpoints`
`protected Log` | `logger` logger used by this class
`protected MessageInfoMapping` | `messageInfoMapping`
`protected String` | `replyTo`
`protected RouterResultsHandler` | `resultsHandler`
`protected TransactionConfig` | `transactionConfig`

Fields inherited from class org.mule.routing.AbstractRouter
`muleContext`

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` | `addEndpoint(OutboundEndpoint endpoint)` Adds an endpoint to this router
`protected TransactionTemplate` | `createTransactionTemplate(MuleSession session, ImmutableEndpoint endpoint)`
`void` | `dispatch(MuleSession session, MuleMessage message, OutboundEndpoint endpoint)`
`int` | `getEnableCorrelation()`
`OutboundEndpoint` | `getEndpoint(String name)`
`List` | `getEndpoints()` Gets a list of Endpoint instances associated with this router
`MessageInfoMapping` | `getMessageInfoMapping()`
`String` | `getReplyTo()` Gets the replyTo endpoint for any outgoing messages.
`RouterResultsHandler` | `getResultsHandler()`
`TransactionConfig` | `getTransactionConfig()`
`boolean` | `isDynamicEndpoints()` Determines whether this router supports dynamic endpoint.
`boolean` | `isRequiresNewMessage()` Determines is this router requires a new message copy.
`boolean` | `removeEndpoint(OutboundEndpoint endpoint)` Removes a specific endpoint from the router
`MuleMessage` | `send(MuleSession session, MuleMessage message, OutboundEndpoint endpoint)`
`void` | `setEnableCorrelation(int enableCorrelation)`
`void` | `setEnableCorrelationAsString(String enableCorrelation)`
`void` | `setEndpoints(List endpoints)` Sets a list of Endpoint instances associated with this router
`void` | `setMessageInfoMapping(MessageInfoMapping messageInfoMapping)`
`protected void` | `setMessageProperties(MuleSession session, MuleMessage message, OutboundEndpoint endpoint)`
`void` | `setReplyTo(String replyTo)` Sets the replyTo endpoint for any outgoing messages.
`void` | `setResultsHandler(RouterResultsHandler resultsHandler)`
`void` | `setTransactionConfig(TransactionConfig transactionConfig)`

Methods inherited from class org.mule.routing.AbstractRouter
`dispose, getMuleContext, getRouterStatistics, initialise, setMuleContext, 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.api.routing.OutboundRouter
`isMatch, route`

Methods inherited from interface org.mule.api.routing.Router
`getRouterStatistics, setRouterStatistics`

Methods inherited from interface org.mule.api.lifecycle.Initialisable
`initialise`

Methods inherited from interface org.mule.api.lifecycle.Disposable
`dispose`

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

  Determines if Mule stamps outgoing message with a correlation ID or not.

### messageInfoMapping

    protected MessageInfoMapping messageInfoMapping

### transactionConfig

    protected TransactionConfig transactionConfig

### resultsHandler

    protected RouterResultsHandler resultsHandler

Constructor Detail

### AbstractOutboundRouter

    public AbstractOutboundRouter()

Method Detail

### dispatch

    public void dispatch(MuleSession session,
                         MuleMessage message,
                         OutboundEndpoint endpoint)
                  throws MuleException

  Throws:
    `MuleException`

### send

    public MuleMessage send(MuleSession session,
                            MuleMessage message,
                            OutboundEndpoint endpoint)
                     throws MuleException

  Throws:
    `MuleException`

### createTransactionTemplate

    protected TransactionTemplate createTransactionTemplate(MuleSession session,
                                                            ImmutableEndpoint endpoint)

### setMessageProperties

    protected void setMessageProperties(MuleSession session,
                                        MuleMessage message,
                                        OutboundEndpoint endpoint)

### getEndpoints

    public List getEndpoints()

  Description copied from interface: `OutboundRouter`
  Gets a list of Endpoint instances associated with this router

  Specified by:
    `getEndpoints` in interface `OutboundRouter`
  Returns:
    a list of Endpoint instances

### setEndpoints

    public void setEndpoints(List endpoints)

  Description copied from interface: `OutboundRouter`
  Sets a list of Endpoint instances associated with this router

  Specified by:
    `setEndpoints` in interface `OutboundRouter`
  Parameters:
    `endpoints` - a list of Endpoint instances

### addEndpoint

    public void addEndpoint(OutboundEndpoint endpoint)

  Description copied from interface: `OutboundRouter`
  Adds an endpoint to this router

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

### removeEndpoint

    public boolean removeEndpoint(OutboundEndpoint endpoint)

  Description copied from interface: `OutboundRouter`
  Removes a specific endpoint from the router

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

### getReplyTo

    public String getReplyTo()

  Description copied from interface: `OutboundRouter`
  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 `OutboundRouter`
  Returns:
    the replyTo endpoint or null if one has not been set.

### setReplyTo

    public void setReplyTo(String replyTo)

  Description copied from interface: `OutboundRouter`
  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 `OutboundRouter`
  Parameters:
    `replyTo` - endpoint string to use

### getEnableCorrelation

    public int getEnableCorrelation()

### setEnableCorrelation

    public void setEnableCorrelation(int enableCorrelation)

### setEnableCorrelationAsString

    public void setEnableCorrelationAsString(String enableCorrelation)

### getMessageInfoMapping

    public MessageInfoMapping getMessageInfoMapping()

### setMessageInfoMapping

    public void setMessageInfoMapping(MessageInfoMapping messageInfoMapping)

### getTransactionConfig

    public TransactionConfig getTransactionConfig()

  Specified by:
    `getTransactionConfig` in interface `OutboundRouter`

### setTransactionConfig

    public void setTransactionConfig(TransactionConfig transactionConfig)

  Specified by:
    `setTransactionConfig` in interface `OutboundRouter`

### isDynamicEndpoints

    public boolean isDynamicEndpoints()

  Description copied from interface: `OutboundRouter`
  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 `OutboundRouter`
  Returns:

### getEndpoint

    public OutboundEndpoint getEndpoint(String name)

  Specified by:
    `getEndpoint` in interface `OutboundRouter`
  Parameters:
    `name` - the Endpoint identifier
  Returns:
    the Endpoint or null if the endpointUri is not registered
  See Also:
    `InboundRouterCollection`

### getResultsHandler

    public RouterResultsHandler getResultsHandler()

### setResultsHandler

    public void setResultsHandler(RouterResultsHandler resultsHandler)

### isRequiresNewMessage

    public boolean isRequiresNewMessage()

  Description copied from interface: `OutboundRouter`
  Determines is this router requires a new message copy.

  Specified by:
    `isRequiresNewMessage` in interface `OutboundRouter`
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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