Class JmsMessageListenerDelegate
java.lang.Object
org.mule.jms.commons.internal.source.push.JmsMessageListenerDelegate
- All Implemented Interfaces:
MessageConsumerDelegate
MessageConsumerDelegate implementation which uses MessageListener- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionJmsMessageListenerDelegate(JmsMessageListenerFactory<?> messageListenerFactory, JmsConnection connection, JmsSupport jmsSupport, ConsumerType consumerType, String destination, JmsConfig<?, ?> config, InternalAckMode resolvedAckMode, String selector, JmsListenerLockFactory lockFactory, JmsResourceReleaser resourceCleaner) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidcreateConsumers(int numberOfConsumers) Creates and start N consumers, where N is defined by the paramnumberOfConsumers.protected voidvoidvoidonError(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext, org.mule.runtime.api.message.Error error) Communicates when a message has not been successfully processed in a flow.voidonSuccess(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext) Communicates when a message has been successfully processed in a flow.voidstop()Request to stop all the message consumers.
-
Constructor Details
-
JmsMessageListenerDelegate
public JmsMessageListenerDelegate(JmsMessageListenerFactory<?> messageListenerFactory, JmsConnection connection, JmsSupport jmsSupport, ConsumerType consumerType, String destination, JmsConfig<?, ?> config, InternalAckMode resolvedAckMode, String selector, JmsListenerLockFactory lockFactory, JmsResourceReleaser resourceCleaner)
-
-
Method Details
-
createConsumers
public void createConsumers(int numberOfConsumers) throws org.mule.runtime.api.connection.ConnectionException Creates and start N consumers, where N is defined by the paramnumberOfConsumers.- Specified by:
createConsumersin interfaceMessageConsumerDelegate- Parameters:
numberOfConsumers- number of consumers to create and start.- Throws:
org.mule.runtime.api.connection.ConnectionException- If an error occurs trying to create and start the consumers.
-
onSuccess
public void onSuccess(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext) Communicates when a message has been successfully processed in a flow.- Specified by:
onSuccessin interfaceMessageConsumerDelegate- Parameters:
callbackContext- Context with references of the processed message.
-
stop
public void stop()Request to stop all the message consumers.- Specified by:
stopin interfaceMessageConsumerDelegate
-
disableConsumers
public void disableConsumers()- Specified by:
disableConsumersin interfaceMessageConsumerDelegate
-
disableConsumerListener
-
closeConsumerQuietly
-
onError
public void onError(org.mule.runtime.extension.api.runtime.source.SourceCallbackContext callbackContext, org.mule.runtime.api.message.Error error) Communicates when a message has not been successfully processed in a flow.- Specified by:
onErrorin interfaceMessageConsumerDelegate- Parameters:
callbackContext- Context with references of the processed message.error- Produced error on the flow.
-