Package org.frankframework.core
Interface IListener<M>
- Type Parameters:
M- the raw message type
- All Superinterfaces:
org.springframework.context.ApplicationContextAware,org.springframework.beans.factory.Aware,FrankElement,HasApplicationContext,HasName,IConfigurable,IScopeProvider,NameAware
- All Known Subinterfaces:
ICorrelatedPullingListener<M>,IJmsListener<M>,IKnowsDeliveryCount<M>,IPeekableListener<M>,IPortConnectedListener<M>,IPullingListener<M>,IPushingListener<M>,IRedeliveringListener<M>,ISapListener<F>,ReceiverAware<M>
- All Known Implementing Classes:
AbstractFileSystemListener,AbstractJmsListener,AbstractMailListener,AmqpListener,ApiListener,BisJmsListener,CmisEventListener,DirectoryListener,EsbJmsListener,ExchangeMailListener,FrankListener,FtpFileSystemListener,FxfListener,ImapListener,JavaListener,JdbcListener,JdbcQueryListener,JdbcTableListener,JmsListener,KafkaListener,MessageStoreListener,MqttListener,PullingJmsListener,PushingJmsListener,PushingListenerAdapter,RestListener,Samba2Listener,SambaListener,SapListener,SapListener,SapListenerImpl,SftpFileSystemListener,SimpleJdbcListener,TibcoLogJmsListener,WebServiceListener
@FrankDocGroup(LISTENER)
@EnterpriseIntegrationPattern(LISTENER)
public interface IListener<M>
extends IConfigurable, FrankElement, NameAware
Base-interface for IPullingListener and IPushingListener.
- Since:
- 4.2
- Author:
- Gerrit van Brakel
-
Method Summary
Modifier and TypeMethodDescriptionvoidafterMessageProcessed(PipeLineResult processResult, RawMessageWrapper<M> rawMessage, PipeLineSession pipeLineSession) Called to perform actions (like committing or sending a reply) after a message has been processed by the Pipeline.extractMessage(RawMessageWrapper<M> rawMessage, Map<String, Object> context) Extracts data from message obtained fromIPullingListener.getRawMessage(Map)orIPushingListener.wrapRawMessage(Object, PipeLineSession).voidstart()Prepares the listener for receiving messages.voidstop()Close all resources used for listening.Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.IConfigurable
configure
-
Method Details
-
start
void start()Prepares the listener for receiving messages.start()is called once each time the listener is started. -
stop
void stop()Close all resources used for listening. Called once each time the listener is stopped. -
extractMessage
Message extractMessage(@Nonnull RawMessageWrapper<M> rawMessage, @Nonnull Map<String, Object> context) throws ListenerExceptionExtracts data from message obtained fromIPullingListener.getRawMessage(Map)orIPushingListener.wrapRawMessage(Object, PipeLineSession). May also extract other parameters from the message and put those into the context.- Parameters:
rawMessage- TheRawMessageWrapperfrom which to extract theMessage.context- Context to populate. Either aPipeLineSessionor aMapthreadContext depending on caller.- Returns:
- input
Messagefor adapter. - Throws:
ListenerException
-
afterMessageProcessed
void afterMessageProcessed(PipeLineResult processResult, RawMessageWrapper<M> rawMessage, PipeLineSession pipeLineSession) throws ListenerException Called to perform actions (like committing or sending a reply) after a message has been processed by the Pipeline.- Throws:
ListenerException
-