use of com.adaptris.core.ChannelList in project interlok by adaptris.
the class BasicActiveMqConsumerTest method createDurableSubsAdapter.
private Adapter createDurableSubsAdapter(String adapterName, EmbeddedActiveMq activeMqBroker) throws Exception {
Adapter adapter = new Adapter();
adapter.setUniqueId(adapterName);
Channel c = new Channel();
JmsConnection conn = activeMqBroker.getJmsConnection(createVendorImpl());
conn.setClientId(MY_CLIENT_ID);
c.setConsumeConnection(conn);
StandardWorkflow swf = new StandardWorkflow();
PasConsumer pasConsumer = new PasConsumer().withTopic(new GuidGenerator().safeUUID());
pasConsumer.setSubscriptionId(MY_SUBSCRIPTION_ID);
swf.setConsumer(pasConsumer);
c.getWorkflowList().add(swf);
ChannelList cl = new ChannelList();
cl.addChannel(c);
adapter.setChannelList(cl);
return adapter;
}
use of com.adaptris.core.ChannelList in project interlok by adaptris.
the class ExampleChannelCase method createExampleXml.
@Override
protected String createExampleXml(Object object) throws Exception {
String result = getExampleCommentHeader(object);
ChannelList w = (ChannelList) object;
result = result + configMarshaller.marshal(w);
return result;
}
use of com.adaptris.core.ChannelList in project interlok by adaptris.
the class LifecycleHelperTest method testLifecycle.
@Test
public void testLifecycle() throws Exception {
StateManagedComponent stateManaged = new NullService();
ComponentLifecycle noState = new ChannelList();
try {
initAndStart(stateManaged);
initAndStart(noState);
initAndStart(null);
stopAndClose(null);
} finally {
stopAndClose(stateManaged);
stopAndClose(noState);
}
}
use of com.adaptris.core.ChannelList in project interlok by adaptris.
the class ExampleErrorHandlerCase method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
Adapter result = new Adapter();
result.setUniqueId("dummy-adapter");
ProcessingExceptionHandler meh = createForExamples();
result.setMessageErrorHandler(meh);
result.setEventHandler(new StubEventHandler());
result.setChannelList(new ChannelList());
return result;
}
use of com.adaptris.core.ChannelList in project interlok by adaptris.
the class RetryFromJettyTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
Adapter result = null;
try {
RetryFromJetty fmr = new RetryFromJetty();
fmr.setConnection(new EmbeddedConnection());
fmr.setRetryStore(new InMemoryRetryStore());
result = new Adapter();
result.setFailedMessageRetrier(fmr);
result.setChannelList(new ChannelList());
result.setEventHandler(new StubEventHandler());
result.setUniqueId(UUID.randomUUID().toString());
} catch (Exception e) {
throw new RuntimeException(e);
}
return result;
}
Aggregations