use of com.adaptris.core.BranchingServiceCollection in project interlok by adaptris.
the class JettyRoutingServiceTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
BranchingServiceCollection sl = new BranchingServiceCollection();
JettyRoutingService service = new JettyRoutingService("NotHandled", createRoutes());
service.setUniqueId("handleRouting");
sl.addService(service);
sl.setFirstServiceId(service.getUniqueId());
sl.addService(new LogMessageService("handleGet"));
sl.addService(new LogMessageService("handleDelete"));
sl.addService(new LogMessageService("handleInsert"));
sl.addService(new ThrowExceptionService("handleUpdate", new ConfiguredException("cannot handle updates")));
return sl;
}
use of com.adaptris.core.BranchingServiceCollection in project interlok by adaptris.
the class MetadataBranchingServiceTest method create.
protected BranchingServiceCollection create(MetadataValueMatcherCreator m) {
BranchingServiceCollection sl = new BranchingServiceCollection();
MetadataValueBranchingService service = new MetadataValueBranchingService();
service.setValueMatcher(m.create());
service.setDefaultServiceId("DefaultServiceId");
service.addMetadataKey("FirstMetadataKeyWhoseValueWeWantToCheck");
// service.addMetadataKey("Second_Metadata_Key_Whose_Value_Is_Appended_To_FirstMetadataKeyWhoseValueWeWantToCheck");
service.setMetadataToServiceIdMappings(m.createMappings());
service.setUniqueId("CheckMetadataValue");
sl.addService(service);
sl.setFirstServiceId(service.getUniqueId());
sl.addService(new LogMessageService("FirstServiceId"));
sl.addService(new ThrowExceptionService("SecondServiceId", new ConfiguredException("Fail")));
sl.addService(new LogMessageService("DefaultServiceId"));
return sl;
}
use of com.adaptris.core.BranchingServiceCollection in project interlok by adaptris.
the class MetadataExistsBranchingServiceTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
BranchingServiceCollection sl = new BranchingServiceCollection();
service.setUniqueId("CheckMetadataExists");
sl.addService(service);
sl.setFirstServiceId(service.getUniqueId());
sl.addService(new LogMessageService("exists"));
sl.addService(new LogMessageService("default"));
return sl;
}
Aggregations