Interface IPullingListener<M>

Type Parameters:
M - the raw message type
All Superinterfaces:
org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.Aware, IConfigurable, IConfigurationAware, IListener<M>, INamedObject, IScopeProvider
All Known Subinterfaces:
ICorrelatedPullingListener<M>, IPeekableListener<M>, IPostboxListener<M>
All Known Implementing Classes:
FileRecordListener, JdbcListener, JdbcQueryListener, JdbcTableListener, MessageStoreListener, PullingJmsListener, SimpleJdbcListener

public interface IPullingListener<M> extends IListener<M>
Defines listening behaviour of pulling receivers. Pulling receivers are receivers that poll for a message, as opposed to pushing receivers that are 'message driven'
Gerrit van Brakel
  • Method Details

    • openThread

      @Nonnull Map<String,Object> openThread() throws ListenerException
      Prepares a thread for receiving messages. Called once for each thread that will listen for messages.
      the threadContext for this thread. The threadContext is a Map in which thread-specific data can be stored. May not be null, must be a mutable map type.
    • closeThread

      void closeThread(@Nonnull Map<String,Object> threadContext) throws ListenerException
      Finalizes a message receiving thread. Called once for each thread that listens for messages, just before IListener.close() is called.
    • getRawMessage

      RawMessageWrapper<M> getRawMessage(@Nonnull Map<String,Object> threadContext) throws ListenerException
      Retrieves messages from queue or other channel, but does no processing on it. Multiple objects may try to call this method at the same time, from different threads. Implementations of this method should therefore be thread-safe, or synchronized.

      Any thread-specific properties should be stored in and retrieved from the threadContext.