public class ShadowSender extends ParallelSenders
Multiple sub-senders can be configured within the ShadowSender, the minimum amount of senders is 2 (originalSender + resultSender)
HasStatistics.Action
senderWrapperProcessor
parameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
ShadowSender() |
Modifier and Type | Method and Description |
---|---|
protected void |
addResult(SaxDocumentBuilder builder,
ISender sender,
Map<ISender,ParallelSenderExecutor> executorMap,
String tagName) |
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
protected void |
executeGuarded(ISender sender,
Message message,
PipeLineSession session,
Guard guard,
Map<ISender,ParallelSenderExecutor> executorMap) |
SenderResult |
sendMessage(Message message,
PipeLineSession session)
We override this from the parallel sender as we should only execute the original and shadowsenders here!
|
void |
setOriginalSender(String senderName)
Name of the sender that is considered that is considered to be the golden standard, i.e.
|
void |
setResultSender(String senderName)
The sender name which will process the results
|
void |
setWaitForShadowsToFinish(boolean waitForShadowsToFinish)
If set
true the sender will wait for all shadows to have finished. |
List<ISender> |
validateExecutableSenders() |
createTaskExecutor, doSendMessage, registerSender, setMaxConcurrentThreads, setSynchronous
close, consumesSessionVariable, getSenders, getStatisticsKeeper, isSenderConfigured, iterateOverStatistics, open, setSender
getLogPrefix, setGetInputFromFixedValue, setGetInputFromSessionKey, setPreserveInput, setStoreInputInSessionKey, setStoreResultInSessionKey
addParameter, checkStringAttributeOrParameter, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
createBean, getName, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCache, setCache
isSynchronous, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
public void configure() throws ConfigurationException
ISender
configure()
is called once at startup of the framework in the configure method of the owner of this sender.
Purpose of this method is to check whether the static configuration of the sender is correct.
As much as possible class-instantiating should take place in the configure()
or open()
method, to improve performance.configure
in interface IConfigurable
configure
in interface ISender
configure
in class ParallelSenders
ConfigurationException
public List<ISender> validateExecutableSenders() throws ConfigurationException
ConfigurationException
protected void executeGuarded(ISender sender, Message message, PipeLineSession session, Guard guard, Map<ISender,ParallelSenderExecutor> executorMap)
public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
sendMessage
in interface ISender
sendMessage
in class SenderWrapperBase
SenderException
TimeoutException
protected void addResult(SaxDocumentBuilder builder, ISender sender, Map<ISender,ParallelSenderExecutor> executorMap, String tagName) throws SAXException, IOException
SAXException
IOException
public void setOriginalSender(String senderName)
public void setResultSender(String senderName)
public void setWaitForShadowsToFinish(boolean waitForShadowsToFinish)
true
the sender will wait for all shadows to have finished. Otherwise the collection of results will happen in a background thread.Copyright © 2023 Frank!Framework. All rights reserved.