use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class ExampleChannelCase method createServiceCollection.
private ServiceCollection createServiceCollection() throws CoreException {
ServiceCollection services = new ServiceList();
AddMetadataService service = new AddMetadataService();
service.addMetadataElement("key1", "val1");
services.addService(service);
services.addService(new LogMessageService());
return services;
}
use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class SharedComponentListTest method createAdapter.
private Adapter createAdapter() throws CoreException, PasswordException {
Adapter adapter = new Adapter();
adapter.setUniqueId("upbeat_liskov");
JmsConnection jmsConnection = createPtpConnection("jms-connection");
adapter.getSharedComponents().addConnection(jmsConnection);
ServiceList serviceList = new ServiceList();
serviceList.setUniqueId("shared-service-list");
serviceList.add(new LogMessageService("log-message-service"));
adapter.getSharedComponents().addService(serviceList);
StandardWorkflow wf1 = new StandardWorkflow();
wf1.setUniqueId("reverent-edison");
wf1.setConsumer(new FsConsumer().withBaseDirectoryUrl("in-directory"));
wf1.setProducer(new FsProducer().withBaseDirectoryUrl("out-directory"));
wf1.getServiceCollection().add(new SharedService("shared-service-list"));
StandardWorkflow wf = new StandardWorkflow();
wf.setUniqueId("pedantic_brown");
wf.setConsumer(new JmsConsumer().withEndpoint("jms:queue:SampleQueue1"));
wf.setProducer(new NullMessageProducer());
wf.getServiceCollection().add(new StandaloneProducer(new SharedConnection("jms-connection"), new JmsProducer().withEndpoint("jms:topic:MyTopicName")));
Channel channel = new Channel();
channel.setUniqueId("quirky_shannon");
channel.setConsumeConnection(new SharedConnection("jms-connection"));
channel.getWorkflowList().add(wf);
channel.getWorkflowList().add(wf1);
adapter.getChannelList().add(channel);
return adapter;
}
use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class BranchingHttpRequestServiceTest method retrieveObjectForSampleConfig.
@Override
protected BranchingServiceCollection retrieveObjectForSampleConfig() {
BranchingHttpRequestService service = createForExamples();
BranchingServiceCollection sl = new BranchingServiceCollection();
sl.addService(service);
sl.setFirstServiceId(service.getUniqueId());
sl.addService(new ThrowExceptionService("5XX Server Error", new ConfiguredException("Got 5XX error from server")));
sl.addService(new ThrowExceptionService("4XX Client Error", new ConfiguredException("Got 4XX error from server")));
sl.addService(new NullService("Not Found"));
sl.addService(new LogMessageService("2XX OK"));
sl.addService(new ThrowExceptionService("DefaultServiceId", new ConfiguredException("Unmatched Response")));
return sl;
}
use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class SyntaxBranchingServiceTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
BranchingServiceCollection sl = new BranchingServiceCollection();
SyntaxBranchingService sbs = new SyntaxBranchingService();
sbs.setUniqueId("determineDocType");
sbs.setSyntaxIdentifiers(createStandardIdentifiers());
sbs.addSyntaxIdentifier(new AlwaysMatchSyntaxIdentifier("alwaysMatches"));
sl.addService(sbs);
sl.setFirstServiceId(sbs.getUniqueId());
sl.addService(new LogMessageService("isPostcode"));
sl.addService(new LogMessageService("isXml"));
sl.addService(new LogMessageService("alwaysMatches"));
return sl;
}
use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class ServiceFromUrlTest method createService.
private File createService() throws Exception {
File f = TempFileUtils.createTrackedFile(this);
String xml = DynamicServiceExecutorTest.createMessage(new ServiceList(new Service[] { new LogMessageService() })).getContent();
try (FileWriter w = new FileWriter(f, false)) {
w.write(xml);
}
return f;
}
Aggregations