Interface JmsListenerLock
- All Known Implementing Classes:
DefaultJmsListenerLock,NullJmsListenerLock
public interface JmsListenerLock
Custom lock implementation to be used in
JmsListener to give the capability to the message listener work synchronously
consuming and processing messages through the entire flow.- Since:
- 1.0
- See Also:
-
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
-
Method Details
-
lock
void lock()Locks the listener waiting to the message to be processed through the flow -
unlock
void unlock()Unlocks the listener indicating that message has been processed correctly -
unlockWithFailure
void unlockWithFailure()Unlocks the listener indicating that message has been processed with failures and the error should be propagated -
unlockWithFailure
void unlockWithFailure(org.mule.runtime.api.message.Error error) Unlocks the listener indicating that message has been processed with failures and the error should be propagated- Parameters:
error- The error to propagate inside the message listener
-
executeOnListenerThread
Executes arunnableon the blocked Listener thread.- Parameters:
runnable- to execute
-
init
void init()Configures the Lock to their initial state.
-