Interface IHasProcessState<M>

All Known Subinterfaces:
IProvidesMessageBrowsers<M>
All Known Implementing Classes:
JdbcListener, JdbcQueryListener, JdbcTableListener, MessageStoreListener, Receiver

public interface IHasProcessState<M>
Interface that can be implemented by Listeners that provide their own management of messages processed and in error. If the status 'inProcess' is specified, it will be used when messages are processed. In case of a rollback of the executing transaction, the status of the message will be reverted to 'available', so that it can be retried.
  • Method Details

    • knownProcessStates

      Set<ProcessState> knownProcessStates()
      Provides the set of ProcessStates used by this listener.
    • targetProcessStates

      Map<ProcessState,Set<ProcessState>> targetProcessStates()
      Provides the set of ProcessStates that a message in the specified state can be moved to, e.g. from a MessageBrowser for that state.
    • changeProcessState

      RawMessageWrapper<M> changeProcessState(RawMessageWrapper<M> message, ProcessState toState, String reason) throws ListenerException
      Change the processState of the message to the specified state, if that state is supported. If it is not supported, nothing changes, and false is returned.
      Returns:
      the moved message, or null if no message was moved.
      Throws:
      ListenerException