Package org.frankframework.core
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:
JdbcListener
,JdbcQueryListener
,JdbcTableListener
,MessageStoreListener
,PullingJmsListener
,SimpleJdbcListener
Defines listening behaviour of pulling receivers.
Pulling receivers are receivers that poll for a message, as opposed to pushing receivers
that are 'message driven'
- Author:
- Gerrit van Brakel
-
Method Summary
Modifier and TypeMethodDescriptionvoid
closeThread
(Map<String, Object> threadContext) Finalizes a message receiving thread.getRawMessage
(Map<String, Object> threadContext) Retrieves messages from queue or other channel, but does no processing on it.Prepares a thread for receiving messages.Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.IConfigurationAware
getApplicationContext, getName
Methods inherited from interface org.frankframework.core.IListener
afterMessageProcessed, close, configure, extractMessage, open
Methods inherited from interface org.frankframework.core.INamedObject
getName, setName
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
-
Method Details
-
openThread
Prepares a thread for receiving messages. Called once for each thread that will listen for messages.- Returns:
- 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. - Throws:
ListenerException
-
closeThread
Finalizes a message receiving thread. Called once for each thread that listens for messages, just beforeIListener.close()
is called.- Throws:
ListenerException
-
getRawMessage
RawMessageWrapper<M> getRawMessage(@Nonnull Map<String, Object> threadContext) throws ListenerExceptionRetrieves 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, orsynchronized
.Any thread-specific properties should be stored in and retrieved from the threadContext.
- Throws:
ListenerException
-