M
- the raw message type@FrankDocGroup(order=30, name="Listeners") public interface IListener<M> extends IConfigurable
Modifier and Type | Method and Description |
---|---|
void |
afterMessageProcessed(PipeLineResult processResult,
Object rawMessageOrWrapper,
Map<String,Object> context)
Called to perform actions (like committing or sending a reply) after a message has been processed by the
Pipeline.
|
void |
close()
Close all resources used for listening.
|
void |
configure()
configure() is called once at startup of the framework in the configure() method
of the owner of this listener. |
Message |
extractMessage(M rawMessage,
Map<String,Object> context)
Extracts string from message obtained from
IPullingListener.getRawMessage(Map) . |
String |
getIdFromRawMessage(M rawMessage,
Map<String,Object> context)
Extracts ID-string from message obtained from
IPullingListener.getRawMessage(Map) . |
void |
open()
Prepares the listener for receiving messages.
|
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
void configure() throws ConfigurationException
configure()
is called once at startup of the framework in the configure()
method
of the owner of this listener.
Purpose of this method is to reduce creating connections to databases etc. in the IPullingListener.getRawMessage(Map)
method.
As much as possible class-instantiating should take place in the
configure()
or open()
method, to improve performance.configure
in interface IConfigurable
ConfigurationException
void open() throws ListenerException
open()
is called once each time the listener is started.ListenerException
void close() throws ListenerException
ListenerException
String getIdFromRawMessage(M rawMessage, Map<String,Object> context) throws ListenerException
IPullingListener.getRawMessage(Map)
. May also extract
other parameters from the message and put those in the context.
ListenerException
Message extractMessage(M rawMessage, Map<String,Object> context) throws ListenerException
IPullingListener.getRawMessage(Map)
. May also extract
other parameters from the message and put those in the threadContext.ListenerException
void afterMessageProcessed(PipeLineResult processResult, Object rawMessageOrWrapper, Map<String,Object> context) throws ListenerException
ListenerException
Copyright © 2023 Frank!Framework. All rights reserved.