use of com.adaptris.core.ServiceList in project interlok by adaptris.
the class AdvancedMessageSplitterServiceTest method testInit.
@Override
public void testInit() throws Exception {
AdvancedMessageSplitterService service = createForTests();
try {
service.init();
fail();
} catch (CoreException expected) {
}
service.setSplitter(new LineCountSplitter());
service.setService(new ServiceList());
service.init();
assertNotNull(service.wrappedServices());
assertEquals(1, service.wrappedServices().length);
}
use of com.adaptris.core.ServiceList in project interlok by adaptris.
the class SplitterCase method createPooling.
static PoolingMessageSplitterService createPooling(MessageSplitter ms, Service... services) {
PoolingMessageSplitterService service = new PoolingMessageSplitterService();
ServiceList sl = new ServiceList(services);
service.setSplitter(ms);
service.setService(sl);
service.setMaxThreads(5);
return service;
}
use of com.adaptris.core.ServiceList in project interlok by adaptris.
the class SplitterCase method createAdvanced.
static AdvancedMessageSplitterService createAdvanced(MessageSplitter ms, Service... services) {
AdvancedMessageSplitterService service = new AdvancedMessageSplitterService();
ServiceList sl = new ServiceList(services);
service.setSplitter(ms);
service.setService(sl);
return service;
}
use of com.adaptris.core.ServiceList in project interlok by adaptris.
the class ServiceUtilTest method testRewriteForTesting_NoConnection.
@Test
public void testRewriteForTesting_NoConnection() throws Exception {
NullService nullService = new NullService();
JdbcServiceList jdbcService = new JdbcServiceList();
StatelessServiceWrapper stateless = new StatelessServiceWrapper(new StandaloneProducer());
assertTrue(nullService == rewriteConnectionsForTesting(nullService));
assertTrue(jdbcService == rewriteConnectionsForTesting(jdbcService));
assertTrue(stateless == rewriteConnectionsForTesting(stateless));
ServiceList nestedList = new ServiceList();
ServiceList list = new ServiceList();
list.add(nestedList);
assertTrue(list == rewriteConnectionsForTesting(list));
}
use of com.adaptris.core.ServiceList 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;
}
Aggregations