public class DefaultJmsListenerLock extends Object implements JmsListenerLock
JmsListenerLock based in the usage of Semaphore to support the capability of locking
and unlocking the listener from different threadsJmsListenerLock,
JmsListener| Constructor and Description |
|---|
DefaultJmsListenerLock() |
| Modifier and Type | Method and Description |
|---|---|
void |
executeOnListenerThread(Runnable runnable)
Executes a
runnable on the blocked Listener thread. |
void |
init()
Configures the Lock to their initial state.
|
void |
lock()
Locks the listener waiting to the message to be processed through the flow
|
void |
unlock()
Unlocks the listener indicating that message has been processed correctly
|
void |
unlockWithFailure()
Unlocks the listener indicating that message has been processed with failures and the error should be propagated
|
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
|
public void lock()
lock in interface JmsListenerLockpublic void unlockWithFailure(org.mule.runtime.api.message.Error error)
unlockWithFailure in interface JmsListenerLockerror - The error to propagate inside the message listenerpublic void unlockWithFailure()
unlockWithFailure in interface JmsListenerLockpublic void unlock()
unlock in interface JmsListenerLockpublic void executeOnListenerThread(Runnable runnable)
runnable on the blocked Listener thread.executeOnListenerThread in interface JmsListenerLockrunnable - to executepublic void init()
init in interface JmsListenerLockCopyright © 2022. All rights reserved.