use of nl.nn.adapterframework.senders.SenderSeries in project iaf by ibissource.
the class ForEachAttachmentPipeTest method setUp.
@Override
@Before
public void setUp() throws Exception {
super.setUp();
pipe = createForEachAttachmentPipe();
pipe.registerForward(new PipeForward("success", null));
SenderSeries series = new SenderSeries();
series.registerSender(new EchoSender());
pipe.setSender(series);
}
use of nl.nn.adapterframework.senders.SenderSeries in project iaf by ibissource.
the class InputOutputSenderWrapperProcessorTest method getSenderWrapper.
public SenderWrapperBase getSenderWrapper() {
SenderSeries senderSeries = new SenderSeries();
senderSeries.registerSender(new SenderBase() {
@Override
public Message sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException {
try {
return new Message("Sender 1: [" + message.asString() + "]");
} catch (IOException e) {
throw new SenderException(e);
}
}
});
senderSeries.registerSender(new SenderBase() {
@Override
public Message sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException {
try {
secondSenderOutput = "Sender 2: [" + message.asString() + "]";
return new Message(secondSenderOutput);
} catch (IOException e) {
throw new SenderException(e);
}
}
});
return senderSeries;
}
use of nl.nn.adapterframework.senders.SenderSeries in project iaf by ibissource.
the class ParallelXsltTest method createPipe.
@Override
public SenderPipe createPipe() {
SenderPipe pipe = new SenderPipe();
SenderSeries psenders = createSenderContainer();
xsltSenders = new ArrayList<XsltSender>();
for (int i = 0; i < NUM_SENDERS; i++) {
XsltSender sender = new XsltSender();
// sender.setSessionKey("out"+i);
sender.setOmitXmlDeclaration(true);
sender.addParameter(new Parameter("header", "header" + i));
session.put("sessionKey" + i, "sessionKeyValue" + i);
sender.addParameter(ParameterBuilder.create().withName("sessionKey").withSessionKey("sessionKey" + i));
autowireByType(sender);
psenders.registerSender(sender);
xsltSenders.add(sender);
}
session.put("sessionKeyGlobal", "sessionKeyGlobalValue");
psenders.addParameter(ParameterBuilder.create().withName("sessionKeyGlobal").withSessionKey("sessionKeyGlobal"));
pipe.setSender(psenders);
return pipe;
}
use of nl.nn.adapterframework.senders.SenderSeries in project iaf by ibissource.
the class ParallelXsltTest method createSenderContainer.
protected SenderSeries createSenderContainer() {
SenderSeries senders = new ParallelSenders();
autowireByType(senders);
return senders;
}
Aggregations