Class NullJmsListenerLock
java.lang.Object
org.mule.jms.commons.internal.source.NullJmsListenerLock
- All Implemented Interfaces:
JmsListenerLock
Null pattern implementation for
JmsListenerLock which doesn't lock the listener waiting for the message processing. The
usage of this lock will led to the JmsListenerLock work asynchronously.- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteOnListenerThread(Runnable runnable) Executes arunnableon the blocked Listener thread.voidinit()Configures the Lock to their initial state.voidlock()Locks the listener waiting to the message to be processed through the flowvoidunlock()Unlocks the listener indicating that message has been processed correctlyvoidUnlocks the listener indicating that message has been processed with failures and the error should be propagatedvoidunlockWithFailure(org.mule.runtime.api.message.Error error) Unlocks the listener indicating that message has been processed with failures and the error should be propagated
-
Constructor Details
-
NullJmsListenerLock
public NullJmsListenerLock()
-
-
Method Details
-
lock
public void lock()Description copied from interface:JmsListenerLockLocks the listener waiting to the message to be processed through the flow- Specified by:
lockin interfaceJmsListenerLock
-
unlock
public void unlock()Description copied from interface:JmsListenerLockUnlocks the listener indicating that message has been processed correctly- Specified by:
unlockin interfaceJmsListenerLock
-
unlockWithFailure
public void unlockWithFailure()Description copied from interface:JmsListenerLockUnlocks the listener indicating that message has been processed with failures and the error should be propagated- Specified by:
unlockWithFailurein interfaceJmsListenerLock
-
unlockWithFailure
public void unlockWithFailure(org.mule.runtime.api.message.Error error) Description copied from interface:JmsListenerLockUnlocks the listener indicating that message has been processed with failures and the error should be propagated- Specified by:
unlockWithFailurein interfaceJmsListenerLock- Parameters:
error- The error to propagate inside the message listener
-
executeOnListenerThread
Description copied from interface:JmsListenerLockExecutes arunnableon the blocked Listener thread.- Specified by:
executeOnListenerThreadin interfaceJmsListenerLock- Parameters:
runnable- to execute
-
init
public void init()Description copied from interface:JmsListenerLockConfigures the Lock to their initial state.- Specified by:
initin interfaceJmsListenerLock
-