Search in sources :

Example 16 with LogMessageService

use of com.adaptris.core.services.LogMessageService 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;
}
Also used : BranchingServiceCollection(com.adaptris.core.BranchingServiceCollection) ThrowExceptionService(com.adaptris.core.services.exception.ThrowExceptionService) LogMessageService(com.adaptris.core.services.LogMessageService) ConfiguredException(com.adaptris.core.services.exception.ConfiguredException)

Example 17 with LogMessageService

use of com.adaptris.core.services.LogMessageService 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;
}
Also used : BranchingServiceCollection(com.adaptris.core.BranchingServiceCollection) ThrowExceptionService(com.adaptris.core.services.exception.ThrowExceptionService) LogMessageService(com.adaptris.core.services.LogMessageService) ConfiguredException(com.adaptris.core.services.exception.ConfiguredException)

Example 18 with LogMessageService

use of com.adaptris.core.services.LogMessageService 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;
}
Also used : BranchingServiceCollection(com.adaptris.core.BranchingServiceCollection) LogMessageService(com.adaptris.core.services.LogMessageService)

Aggregations

LogMessageService (com.adaptris.core.services.LogMessageService)18 BranchingServiceCollection (com.adaptris.core.BranchingServiceCollection)7 ServiceList (com.adaptris.core.ServiceList)4 ConditionMetadata (com.adaptris.core.services.conditional.conditions.ConditionMetadata)3 ConditionOr (com.adaptris.core.services.conditional.conditions.ConditionOr)3 NotNull (com.adaptris.core.services.conditional.operator.NotNull)3 ConfiguredException (com.adaptris.core.services.exception.ConfiguredException)3 ThrowExceptionService (com.adaptris.core.services.exception.ThrowExceptionService)3 IsNull (com.adaptris.core.services.conditional.operator.IsNull)2 AddMetadataService (com.adaptris.core.services.metadata.AddMetadataService)2 AdaptrisMessage (com.adaptris.core.AdaptrisMessage)1 CoreException (com.adaptris.core.CoreException)1 NullService (com.adaptris.core.NullService)1 ServiceCollection (com.adaptris.core.ServiceCollection)1 ServiceException (com.adaptris.core.ServiceException)1 ExpiringMapCache (com.adaptris.core.cache.ExpiringMapCache)1 ConstantDataInputParameter (com.adaptris.core.common.ConstantDataInputParameter)1 FsConsumer (com.adaptris.core.fs.FsConsumer)1 FsProducer (com.adaptris.core.fs.FsProducer)1 JmsConnection (com.adaptris.core.jms.JmsConnection)1