Search in sources :

Example 1 with JmsConsumer

use of com.adaptris.core.jms.JmsConsumer 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;
}
Also used : JmsProducer(com.adaptris.core.jms.JmsProducer) LogMessageService(com.adaptris.core.services.LogMessageService) FsProducer(com.adaptris.core.fs.FsProducer) JmsConsumer(com.adaptris.core.jms.JmsConsumer) FsConsumer(com.adaptris.core.fs.FsConsumer) JmsConnection(com.adaptris.core.jms.JmsConnection)

Aggregations

FsConsumer (com.adaptris.core.fs.FsConsumer)1 FsProducer (com.adaptris.core.fs.FsProducer)1 JmsConnection (com.adaptris.core.jms.JmsConnection)1 JmsConsumer (com.adaptris.core.jms.JmsConsumer)1 JmsProducer (com.adaptris.core.jms.JmsProducer)1 LogMessageService (com.adaptris.core.services.LogMessageService)1