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 Type
    Method
    Description
    void
    Executes a runnable on the blocked Listener thread.
    void
    Configures the Lock to their initial state.
    void
    Locks the listener waiting to the message to be processed through the flow
    void
    Unlocks the listener indicating that message has been processed correctly
    void
    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
  • 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

      void executeOnListenerThread(Runnable runnable)
      Executes a runnable on the blocked Listener thread.
      Parameters:
      runnable - to execute
    • init

      void init()
      Configures the Lock to their initial state.