Package org.frankframework.larva
Class ListenerMessageHandler<M>
java.lang.Object
org.frankframework.larva.ListenerMessageHandler<M>
- All Implemented Interfaces:
IMessageHandler<M>
Message handler for JavaListener and WebServiceListener.
- Author:
- Jaco de Groot, Niels Meijer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatException
(String extraInfo, String arg1, Message arg2, Throwable arg3) Formats any exception thrown by any of the above methods to a message that can be returned.Attempt to retrieve aListenerMessage
.Attempt to retrieve aListenerMessage
.void
processRawMessage
(IListener<M> origin, RawMessageWrapper<M> rawMessage, PipeLineSession threadContext, boolean duplicatesAlreadyChecked) Will use listener to performIListener.extractMessage(org.frankframework.receivers.RawMessageWrapper<M>, java.util.Map<java.lang.String, java.lang.Object>)
andIListener.afterMessageProcessed(org.frankframework.core.PipeLineResult, org.frankframework.receivers.RawMessageWrapper<M>, org.frankframework.core.PipeLineSession)
processRequest
(IListener<M> origin, RawMessageWrapper<M> rawMessage, Message message, PipeLineSession session) Alternative to functions above, will NOT useIListener.extractMessage(org.frankframework.receivers.RawMessageWrapper<M>, java.util.Map<java.lang.String, java.lang.Object>)
.void
putResponseMessage
(ListenerMessage listenerMessage) void
setRequestTimeOut
(int timeout) void
setResponseTimeOut
(int timeout) void
setTimeout
(long defaultTimeout)
-
Constructor Details
-
ListenerMessageHandler
public ListenerMessageHandler()
-
-
Method Details
-
processRequest
public Message processRequest(IListener<M> origin, RawMessageWrapper<M> rawMessage, Message message, PipeLineSession session) throws ListenerException Description copied from interface:IMessageHandler
Alternative to functions above, will NOT useIListener.extractMessage(org.frankframework.receivers.RawMessageWrapper<M>, java.util.Map<java.lang.String, java.lang.Object>)
. Used by PushingListeners.- Specified by:
processRequest
in interfaceIMessageHandler<M>
- Throws:
ListenerException
-
getRequestMessage
Attempt to retrieve aListenerMessage
. Returns NULL if none is present -
getRequestMessageWithDefaultTimeout
- Throws:
TimeoutException
-
getResponseMessage
Attempt to retrieve aListenerMessage
. Returns NULL if none is present -
putResponseMessage
-
setTimeout
public void setTimeout(long defaultTimeout) -
setRequestTimeOut
public void setRequestTimeOut(int timeout) -
setResponseTimeOut
public void setResponseTimeOut(int timeout) -
processRawMessage
public void processRawMessage(IListener<M> origin, RawMessageWrapper<M> rawMessage, PipeLineSession threadContext, boolean duplicatesAlreadyChecked) throws ListenerException Description copied from interface:IMessageHandler
Will use listener to performIListener.extractMessage(org.frankframework.receivers.RawMessageWrapper<M>, java.util.Map<java.lang.String, java.lang.Object>)
andIListener.afterMessageProcessed(org.frankframework.core.PipeLineResult, org.frankframework.receivers.RawMessageWrapper<M>, org.frankframework.core.PipeLineSession)
- Specified by:
processRawMessage
in interfaceIMessageHandler<M>
- Throws:
ListenerException
-
formatException
Description copied from interface:IMessageHandler
Formats any exception thrown by any of the above methods to a message that can be returned. Can be used if the calling system has no other way of returning the exception to the caller.- Specified by:
formatException
in interfaceIMessageHandler<M>
-