org.mule.transport.jms
Class JmsMessageDispatcher
java.lang.Object
org.mule.transport.AbstractTransportMessageHandler
org.mule.transport.AbstractMessageDispatcher
org.mule.transport.jms.JmsMessageDispatcher
- All Implemented Interfaces:
- Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, MessageProcessor, Connectable, MessageDispatcher
public class JmsMessageDispatcher
- extends AbstractMessageDispatcher
JmsMessageDispatcher
is responsible for dispatching messages to JMS
destinations. All JMS semantics apply and settings such as replyTo and QoS
properties are read from the event properties or defaults are used (according to
the JMS specification)
Method Summary |
protected void |
applyOutboundTransformers(MuleEvent event)
|
protected MuleMessage |
createMessageWithJmsMessagePayload(Message jmsMessage)
|
protected MessageConsumer |
createReplyToConsumer(Message currentMessage,
MuleEvent event,
Session session,
Destination replyTo,
boolean topic)
|
protected void |
doConnect()
|
protected void |
doDisconnect()
|
protected void |
doDispatch(MuleEvent event)
|
protected void |
doDispose()
|
protected MuleMessage |
doSend(MuleEvent event)
|
protected Destination |
getReplyToDestination(Message message,
Session session,
MuleEvent event,
boolean remoteSync,
boolean topic)
|
protected void |
handleMultiTx(Session session)
|
protected boolean |
isDisableTemporaryDestinations()
|
protected boolean |
isHandleReplyTo(Message msg,
MuleEvent event)
Some JMS implementations do not support ReplyTo or require some further fiddling of the message |
protected void |
preTransformMessage(MuleMessage message)
This method is called before the current message is transformed. |
protected void |
processMessage(Message msg,
MuleEvent event)
This method is called once the JMS message is created. |
Methods inherited from class org.mule.transport.AbstractTransportMessageHandler |
activate, connect, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, doInitialise, doStart, doStop, getConnectEventId, getConnectionDescription, getConnector, getLifecycleState, initialise, initializeMessageFactory, initializeRetryPolicy, isConnected, isDoThreading, isStarted, isStarting, isStopping, passivate, setEndpoint, start, stop, toString, validate, validateConnection |
Methods inherited from interface org.mule.api.lifecycle.Startable |
start |
Methods inherited from interface org.mule.api.lifecycle.Stoppable |
stop |
JmsMessageDispatcher
public JmsMessageDispatcher(OutboundEndpoint endpoint)
doDispatch
protected void doDispatch(MuleEvent event)
throws Exception
- Specified by:
doDispatch
in class AbstractMessageDispatcher
- Throws:
Exception
doConnect
protected void doConnect()
throws Exception
- Overrides:
doConnect
in class AbstractTransportMessageHandler
- Throws:
Exception
doDisconnect
protected void doDisconnect()
throws Exception
- Overrides:
doDisconnect
in class AbstractTransportMessageHandler
- Throws:
Exception
isDisableTemporaryDestinations
protected boolean isDisableTemporaryDestinations()
createMessageWithJmsMessagePayload
protected MuleMessage createMessageWithJmsMessagePayload(Message jmsMessage)
throws Exception
- Throws:
Exception
preTransformMessage
protected void preTransformMessage(MuleMessage message)
throws Exception
- This method is called before the current message is transformed. It can be used to do any message body or
header processing before the transformer is called.
- Parameters:
message
- the current MuleMessage Being processed
- Throws:
Exception
handleMultiTx
protected void handleMultiTx(Session session)
throws Exception
- Throws:
Exception
doSend
protected MuleMessage doSend(MuleEvent event)
throws Exception
- Specified by:
doSend
in class AbstractMessageDispatcher
- Throws:
Exception
doDispose
protected void doDispose()
- Overrides:
doDispose
in class AbstractTransportMessageHandler
processMessage
protected void processMessage(Message msg,
MuleEvent event)
throws JMSException
- This method is called once the JMS message is created. It allows subclasses to alter the
message if necessary.
- Parameters:
msg
- The JMS message that will be sentevent
- the current event
- Throws:
JMSException
- if the JmsMessage cannot be written to, this should not happen because
the JMSMessage passed in will always be newly created
isHandleReplyTo
protected boolean isHandleReplyTo(Message msg,
MuleEvent event)
throws JMSException
- Some JMS implementations do not support ReplyTo or require some further fiddling of the message
- Parameters:
msg
- The JMS message that will be sentevent
- the current event
- Returns:
- true if this request should honour any JMSReplyTo settings on the message
- Throws:
JMSException
- if the JmsMessage cannot be written to, this should not happen because the JMSMessage passed
in will always be newly created
createReplyToConsumer
protected MessageConsumer createReplyToConsumer(Message currentMessage,
MuleEvent event,
Session session,
Destination replyTo,
boolean topic)
throws JMSException
- Throws:
JMSException
getReplyToDestination
protected Destination getReplyToDestination(Message message,
Session session,
MuleEvent event,
boolean remoteSync,
boolean topic)
throws JMSException,
EndpointException,
InitialisationException
- Throws:
JMSException
EndpointException
InitialisationException
applyOutboundTransformers
protected void applyOutboundTransformers(MuleEvent event)
throws MuleException
- Overrides:
applyOutboundTransformers
in class AbstractMessageDispatcher
- Throws:
MuleException
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.