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.transport
Class AbstractMessageDispatcher

    java.lang.Object
      org.mule.transport.AbstractConnectable
          org.mule.transport.AbstractMessageDispatcher

All Implemented Interfaces:
  Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, MessageProcessor, Connectable, MessageDispatcher

Direct Known Subclasses:
  AjaxMessageDispatcher, AxisMessageDispatcher, FileMessageDispatcher, FtpMessageDispatcher, HttpClientMessageDispatcher, IBeansMessageDispatcher, JdbcMessageDispatcher, JmsMessageDispatcher, ProcessMessageDispatcher, QuartzMessageDispatcher, RmiMessageDispatcher, SmtpMessageDispatcher, StdioMessageDispatcher, TcpMessageDispatcher, UdpMessageDispatcher, UnsupportedMessageDispatcher, VMMessageDispatcher, XmppMessageDispatcher

    public abstract class AbstractMessageDispatcher

extends AbstractConnectable
implements MessageDispatcher

Abstract implementation of an outbound channel adaptors. Outbound channel adaptors send messages over over a specific transport. Different implementations may support different Message Exchange Patterns.

Field Summary
`protected List<Transformer>` | `defaultOutboundTransformers`
`protected List<Transformer>` | `defaultResponseTransformers`

Fields inherited from class org.mule.transport.AbstractConnectable
`connected, connecting, connector, endpoint, lifecycleManager, logger, muleMessageFactory, retryTemplate, startOnConnect`

Fields inherited from interface org.mule.api.transport.MessageDispatcher
`RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Startable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Stoppable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Constructor Summary
`AbstractMessageDispatcher(OutboundEndpoint endpoint)`

Method Summary
`protected void` | `applyOutboundTransformers(MuleEvent event)`
`protected void` | `applyResponseTransformers(MuleEvent event)`
`protected ConnectableLifecycleManager` | `createLifecycleManager()`
`protected abstract void` | `doDispatch(MuleEvent event)`
`protected abstract MuleMessage` | `doSend(MuleEvent event)`
`protected String` | `getDispatcherName()`
`OutboundEndpoint` | `getEndpoint()`
`protected WorkManager` | `getWorkManager()`
`MuleEvent` | `process(MuleEvent event)` Invokes the MessageProcessor.
`protected boolean` | `returnResponse(MuleEvent event)` Deprecated.
`protected boolean` | `returnResponse(MuleEvent event, boolean doSend)` Used to determine if the dispatcher implementation should wait for a response to an event on a response channel after it sends the event.

Methods inherited from class org.mule.transport.AbstractConnectable
`activate, callDoStartWhenItIsConnected, connect, connectAndThenStart, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, doConnect, doDisconnect, doDispose, doInitialise, doStart, doStop, getConnectEventId, getConnectionDescription, getConnector, getLifecycleState, initialise, initializeMessageFactory, initializeRetryPolicy, isConnected, isConnecting, isDoStartMustFollowDoConnect, isDoThreading, isStarted, passivate, setEndpoint, start, stop, toString, validate, validateConnection`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.mule.api.transport.MessageDispatcher
`activate, createMuleMessage, createMuleMessage, getConnector, passivate, validate`

Methods inherited from interface org.mule.api.transport.Connectable
`connect, disconnect, getConnectionDescription, isConnected, validateConnection`

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

Methods inherited from interface org.mule.api.lifecycle.Startable
`start`

Methods inherited from interface org.mule.api.lifecycle.Stoppable
`stop`

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

Methods inherited from interface org.mule.api.lifecycle.LifecycleStateEnabled
`getLifecycleState`

Field Detail

### defaultOutboundTransformers

    protected List<Transformer> defaultOutboundTransformers

### defaultResponseTransformers

    protected List<Transformer> defaultResponseTransformers

Constructor Detail

### AbstractMessageDispatcher

    public AbstractMessageDispatcher(OutboundEndpoint endpoint)

Method Detail

### createLifecycleManager

    protected ConnectableLifecycleManager createLifecycleManager()

  Specified by:
    `createLifecycleManager` in class `AbstractConnectable`

### getDispatcherName

    protected String getDispatcherName()

### process

    public MuleEvent process(MuleEvent event)
                      throws MuleException

  Description copied from interface: `MessageProcessor`
  Invokes the MessageProcessor.

  Specified by:
    `process` in interface `MessageProcessor`
  Parameters:
    `event` - MuleEvent to be processed
  Returns:
    optional response MuleEvent
  Throws:
    `MuleException`

### returnResponse

    @Deprecated
    protected boolean returnResponse(MuleEvent event)

  Deprecated.

### returnResponse

    protected boolean returnResponse(MuleEvent event,
                                     boolean doSend)

  Used to determine if the dispatcher implementation should wait for a response to an event on a response channel after it sends the event. The following rules apply:
  1. The connector has to support "back-channel" response. Some transports do not have the notion of a response channel.
  2. Check if the endpoint is synchronous (outbound synchronicity is not explicit since 2.2 and does not use the remoteSync message property).
  3. Or, if the send() method on the dispatcher was used. (This is required because the ChainingRouter uses send() with async endpoints. See MULE-4631).
  4. Finally, if the current service has a response router configured, that the router will handle the response channel event and we should not try and receive a response in the Message dispatcher If remotesync should not be used we must remove the REMOTE_SYNC header Note the MuleClient will automatically set the REMOTE_SYNC header when client.send(..) is called so that results are returned from remote invocations too.

  Parameters:
    `event` - the current event
  Returns:
    true if a response channel should be used to get a response from the event dispatch.

### getWorkManager

    protected WorkManager getWorkManager()

  Specified by:
    `getWorkManager` in class `AbstractConnectable`

### getEndpoint

    public OutboundEndpoint getEndpoint()

  Specified by:
    `getEndpoint` in interface `MessageDispatcher`
  Overrides:
    `getEndpoint` in class `AbstractConnectable`
  Returns:
    the endpoint which we are dispatching events to

### applyOutboundTransformers

    protected void applyOutboundTransformers(MuleEvent event)
                                      throws MuleException

  Throws:
    `MuleException`

### applyResponseTransformers

    protected void applyResponseTransformers(MuleEvent event)
                                      throws MuleException

  Throws:
    `MuleException`

### doDispatch

    protected abstract void doDispatch(MuleEvent event)
                                throws Exception

  Throws:
    `Exception`

### doSend

    protected abstract MuleMessage doSend(MuleEvent event)
                                   throws Exception

  Throws:
    `Exception`

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-2010 MuleSoft, Inc.. All Rights Reserved.