Class MessageHandler<M>
java.lang.Object
org.frankframework.receivers.MessageHandler<M>
- All Implemented Interfaces:
IMessageHandler<M>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public class MessageHandler<M>
extends Object
implements IMessageHandler<M>, org.springframework.context.ApplicationContextAware
-
Constructor Summary
ConstructorsConstructorDescriptionMessageHandler(org.springframework.transaction.PlatformTransactionManager txManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessRawMessage(@NonNull IPushingListener<M> origin, @NonNull RawMessageWrapper<M> message, @NonNull PipeLineSession session, boolean duplicatesAlreadyChecked) This method processes the raw message from the listener.@NonNull MessageprocessRequest(@NonNull IPushingListener<M> origin, @NonNull MessageWrapper<M> messageWrapper, @NonNull PipeLineSession session) Process the received message withIMessageHandler.processRequest(IPushingListener, MessageWrapper, PipeLineSession).voidsetApplicationContext(@NonNull org.springframework.context.ApplicationContext context) voidsetReceiver(@NonNull Receiver<M> receiver)
-
Constructor Details
-
MessageHandler
public MessageHandler(org.springframework.transaction.PlatformTransactionManager txManager)
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(@NonNull org.springframework.context.ApplicationContext context) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
setReceiver
-
processRawMessage
public void processRawMessage(@NonNull IPushingListener<M> origin, @NonNull RawMessageWrapper<M> message, @NonNull PipeLineSession session, boolean duplicatesAlreadyChecked) throws ListenerException This method processes the raw message from the listener.
The method assumes that a transaction has been started where necessary.If the
.rawMessageparameter is an instance ofMessageWrapperthen this method will not callIListener.extractMessage(RawMessageWrapper, Map)but directly access the enclosedMessageand theinvalid reference
RawMessageWrapper#getContext()- Specified by:
processRawMessagein interfaceIMessageHandler<M>- Throws:
ListenerException
-
processRequest
public @NonNull Message processRequest(@NonNull IPushingListener<M> origin, @NonNull MessageWrapper<M> messageWrapper, @NonNull PipeLineSession session) throws ListenerException Process the received message withIMessageHandler.processRequest(IPushingListener, MessageWrapper, PipeLineSession).
A messageId is generated that is unique and consists of the name of this listener and a GUID.If the receiver is transactional, then this method will enforce the transactional requirements specified by
HasTransactionAttribute.setTransactionAttribute(TransactionAttribute).N.B. callers of this method should clear the remaining ThreadContext if it's not to be returned to their callers.
- Specified by:
processRequestin interfaceIMessageHandler<M>- Throws:
ListenerException
-