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)Modifier and Type | Class and Description |
---|---|
protected class |
JmsMessageDispatcher.LatchReplyToListener |
defaultOutboundTransformers, defaultResponseTransformers
connected, defaultMessageInfoMapping, endpoint, lifecycleManager, logger, muleMessageFactory, retryTemplate
RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY
PHASE_NAME
PHASE_NAME
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
JmsMessageDispatcher(OutboundEndpoint endpoint) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyOutboundTransformers(MuleEvent event) |
protected MuleMessage |
createMessageWithJmsMessagePayload(Message jmsMessage) |
protected MessageConsumer |
createReplyToConsumer(Message jmsMessage,
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 void |
doSendNonBlocking(MuleEvent event,
CompletionHandler<MuleMessage,Exception> completionHandler) |
protected String |
encodeVendorSpecificID(String jmsCorrelationID)
By default, no encoding is performed.
|
protected String |
getCorrelationId(MuleEvent event) |
protected boolean |
getPersistentDelivery(MuleMessage message) |
protected int |
getPriority(MuleMessage message) |
protected Destination |
getReplyToDestination(Message message,
Session session,
MuleEvent event,
boolean remoteSync,
boolean topic) |
protected long |
getTimeToLive(MuleMessage message) |
protected void |
handleMultiTx(Session session)
Deprecated.
|
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 boolean |
isSupportsNonBlocking()
Dispatcher implementations that support non-blocking processing should override this method and return 'true'.
|
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.
|
protected String |
resolveJmsCorrelationId(MuleEvent event)
Resolve the value of correlationID that should be used for the JMS Message.
|
applyResponseTransformers, createLifecycleManager, getDispatcherName, getEndpoint, getWorkManager, process, returnResponse, returnResponse
activate, connect, connectHandler, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, doInitialise, doStart, doStartHandler, doStop, getConnectEventId, getConnectionDescription, getConnector, getLifecycleState, initialise, initializeMessageFactory, initializeRetryPolicy, isConnected, isDoThreading, isStarted, isStarting, isStopped, isStopping, passivate, setEndpoint, start, stop, toString, validate, validateConnection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
activate, createMuleMessage, createMuleMessage, getConnector, passivate, validate
connect, disconnect, getConnectionDescription, isConnected, validateConnection
initialise
dispose
getLifecycleState
public JmsMessageDispatcher(OutboundEndpoint endpoint)
protected void doDispatch(MuleEvent event) throws Exception
doDispatch
in class AbstractMessageDispatcher
Exception
protected void doConnect() throws Exception
doConnect
in class AbstractTransportMessageHandler
Exception
protected void doDisconnect() throws Exception
doDisconnect
in class AbstractTransportMessageHandler
Exception
protected boolean isDisableTemporaryDestinations()
protected long getTimeToLive(MuleMessage message)
protected int getPriority(MuleMessage message)
protected boolean getPersistentDelivery(MuleMessage message)
protected String resolveJmsCorrelationId(MuleEvent event) throws JMSException
event
- the current MuleEventJMSException
protected MuleMessage createMessageWithJmsMessagePayload(Message jmsMessage) throws Exception
Exception
protected void preTransformMessage(MuleMessage message) throws Exception
message
- the current MuleMessage Being processedException
@Deprecated protected void handleMultiTx(Session session) throws Exception
Exception
protected MuleMessage doSend(MuleEvent event) throws Exception
doSend
in class AbstractMessageDispatcher
Exception
protected void doSendNonBlocking(MuleEvent event, CompletionHandler<MuleMessage,Exception> completionHandler)
doSendNonBlocking
in class AbstractMessageDispatcher
protected void doDispose()
doDispose
in class AbstractTransportMessageHandler
protected void processMessage(Message msg, MuleEvent event) throws JMSException
msg
- The JMS message that will be sentevent
- the current eventJMSException
- if the JmsMessage cannot be written to, this should not happen because
the JMSMessage passed in will always be newly createdprotected boolean isHandleReplyTo(Message msg, MuleEvent event) throws JMSException
msg
- The JMS message that will be sentevent
- the current eventJMSException
- if the JmsMessage cannot be written to, this should not happen because the JMSMessage passed
in will always be newly createdprotected MessageConsumer createReplyToConsumer(Message jmsMessage, MuleEvent event, Session session, Destination replyTo, boolean topic) throws JMSException
JMSException
protected String encodeVendorSpecificID(String jmsCorrelationID)
jmsCorrelationID
- the correlation ID to encodeprotected Destination getReplyToDestination(Message message, Session session, MuleEvent event, boolean remoteSync, boolean topic) throws JMSException, EndpointException, InitialisationException
protected void applyOutboundTransformers(MuleEvent event) throws MuleException
applyOutboundTransformers
in class AbstractMessageDispatcher
MuleException
protected boolean isSupportsNonBlocking()
AbstractMessageDispatcher
AbstractMessageDispatcher.doSendNonBlocking(MuleEvent, CompletionHandler)
method.isSupportsNonBlocking
in class AbstractMessageDispatcher
Copyright © 2003–2018 MuleSoft, Inc.. All rights reserved.