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.
Only used for PushingListeners.
- Author:
- Niels Meijer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempt to retrieve aListenerMessage.Attempt to retrieve aListenerMessage.voidprocessRawMessage(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)TODO Shouldn't this be a IPullingListener or at least an interface that containsIListener.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(IPushingListener<M> origin, MessageWrapper<M> rawMessage, PipeLineSession session) Alternative to functions above, will NOT useIListener.extractMessage(org.frankframework.receivers.RawMessageWrapper<M>, java.util.Map<java.lang.String, java.lang.Object>)as both input and output are aMessage.voidputResponseMessage(ListenerMessage listenerMessage) voidsetRequestTimeOut(int timeout) voidsetResponseTimeOut(int timeout) voidsetTimeout(long timeout)
-
Constructor Details
-
ListenerMessageHandler
public ListenerMessageHandler(long defaultTimeout)
-
-
Method Details
-
processRequest
public Message processRequest(IPushingListener<M> origin, MessageWrapper<M> rawMessage, PipeLineSession session) throws ListenerException Description copied from interface:IMessageHandlerAlternative to functions above, will NOT useIListener.extractMessage(org.frankframework.receivers.RawMessageWrapper<M>, java.util.Map<java.lang.String, java.lang.Object>)as both input and output are aMessage.- Specified by:
processRequestin interfaceIMessageHandler<M>- Throws:
ListenerException
-
processRawMessage
public void processRawMessage(IListener<M> origin, RawMessageWrapper<M> rawMessage, PipeLineSession threadContext, boolean duplicatesAlreadyChecked) throws ListenerException Description copied from interface:IMessageHandlerWill 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)TODO Shouldn't this be a IPullingListener or at least an interface that containsIListener.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). Then listeners should implement either A or B, and don't have to worry about implementing methods are will never be used...- Specified by:
processRawMessagein interfaceIMessageHandler<M>- Throws:
ListenerException
-
getRequestMessageOrNull
Attempt to retrieve aListenerMessage. Returns NULL if none is present -
getRequestMessageWithDefaultTimeout
- Throws:
TimeoutException
-
getResponseMessageOrNull
Attempt to retrieve aListenerMessage. Returns NULL if none is present -
putResponseMessage
-
setTimeout
public void setTimeout(long timeout) -
setRequestTimeOut
public void setRequestTimeOut(int timeout) -
setResponseTimeOut
public void setResponseTimeOut(int timeout)
-