org.mule.api.transport
Interface MessageDispatcher

All Superinterfaces:
Connectable, Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, MessageProcessor, Startable, Stoppable
All Known Implementing Classes:
AbstractMessageDispatcher, AjaxMessageDispatcher, AxisMessageDispatcher, AxisWsdlMessageDispatcher, EjbMessageDispatcher, FileMessageDispatcher, FtpMessageDispatcher, HttpClientMessageDispatcher, HttpsClientMessageDispatcher, JdbcMessageDispatcher, JmsMessageDispatcher, LocalSocketTcpMessageDispatcher, QuartzMessageDispatcher, RmiMessageDispatcher, SftpMessageDispatcher, SmtpMessageDispatcher, StdioMessageDispatcher, TcpMessageDispatcher, UdpMessageDispatcher, UnsupportedMessageDispatcher, VMMessageDispatcher, XmppMessageDispatcher

public interface MessageDispatcher
extends Connectable, MessageProcessor, LifecycleStateEnabled

Combine MessageDispatching with various lifecycle methods for the actual instances doing message sending.


Field Summary
static long RECEIVE_NO_WAIT
           
static long 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
 
Method Summary
 void activate()
          This method can perform necessary state updates before any of the MessageDispatching methods are invoked.
 MuleMessage createMuleMessage(Object transportMessage)
           
 MuleMessage createMuleMessage(Object transportMessage, String encoding)
           
 Connector getConnector()
          Gets the connector for this dispatcher
 OutboundEndpoint getEndpoint()
           
 void passivate()
          After sending a message, the dispatcher can use this method e.g.
 boolean validate()
          Determines whether this dispatcher can be reused after message sending.
 
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.processor.MessageProcessor
process
 
Methods inherited from interface org.mule.api.lifecycle.LifecycleStateEnabled
getLifecycleState
 

Field Detail

RECEIVE_WAIT_INDEFINITELY

static final long RECEIVE_WAIT_INDEFINITELY
See Also:
Constant Field Values

RECEIVE_NO_WAIT

static final long RECEIVE_NO_WAIT
See Also:
Constant Field Values
Method Detail

activate

void activate()
This method can perform necessary state updates before any of the MessageDispatching methods are invoked.

See Also:
MessageDispatcherFactory.activate(OutboundEndpoint, MessageDispatcher)

passivate

void passivate()
After sending a message, the dispatcher can use this method e.g. to clean up its internal state (if it has any) or return pooled resources to whereever it got them during activate().

See Also:
MessageDispatcherFactory.passivate(OutboundEndpoint, MessageDispatcher)

validate

boolean validate()
Determines whether this dispatcher can be reused after message sending.

Returns:
true if this dispatcher can be reused, false otherwise (for example when Disposable.dispose() has been called because an Exception was raised)

getConnector

Connector getConnector()
Gets the connector for this dispatcher

Returns:
the connector for this dispatcher

getEndpoint

OutboundEndpoint getEndpoint()
Returns:
the endpoint which we are dispatching events to

createMuleMessage

MuleMessage createMuleMessage(Object transportMessage,
                              String encoding)
                              throws MuleException
Throws:
MuleException

createMuleMessage

MuleMessage createMuleMessage(Object transportMessage)
                              throws MuleException
Throws:
MuleException


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.