Search in sources :

Example 1 with NullProcessingExceptionHandler

use of com.adaptris.core.NullProcessingExceptionHandler in project interlok by adaptris.

the class JmsTransactedWorkflowTest method createPlainChannel.

private Channel createPlainChannel() throws Exception {
    GuidGenerator guid = new GuidGenerator();
    Channel result = new MockChannel();
    result.setUniqueId(guid.create(result));
    result.setMessageErrorHandler(new NullProcessingExceptionHandler());
    return result;
}
Also used : MockChannel(com.adaptris.core.stubs.MockChannel) MockChannel(com.adaptris.core.stubs.MockChannel) Channel(com.adaptris.core.Channel) GuidGenerator(com.adaptris.util.GuidGenerator) NullProcessingExceptionHandler(com.adaptris.core.NullProcessingExceptionHandler)

Example 2 with NullProcessingExceptionHandler

use of com.adaptris.core.NullProcessingExceptionHandler in project interlok by adaptris.

the class ExampleWorkflowCase method testRegisterObjects.

@Test
public void testRegisterObjects() throws Exception {
    WorkflowImp wf = createWorkflowForGenericTests();
    wf.registerChannel(new Channel());
    try {
        wf.registerChannel(null);
        fail();
    } catch (IllegalArgumentException e) {
        ;
    }
    wf.registerActiveMsgErrorHandler(new NullProcessingExceptionHandler());
    try {
        wf.registerActiveMsgErrorHandler(null);
        fail();
    } catch (IllegalArgumentException e) {
        ;
    }
    wf.registerActiveMsgErrorHandler(new NullProcessingExceptionHandler());
    try {
        wf.registerActiveMsgErrorHandler(null);
        fail();
    } catch (IllegalArgumentException e) {
        ;
    }
    wf.registerEventHandler(new DefaultEventHandler());
    try {
        wf.registerEventHandler(null);
        fail();
    } catch (IllegalArgumentException e) {
        ;
    }
}
Also used : DefaultEventHandler(com.adaptris.core.DefaultEventHandler) MockChannel(com.adaptris.core.stubs.MockChannel) Channel(com.adaptris.core.Channel) WorkflowImp(com.adaptris.core.WorkflowImp) NullProcessingExceptionHandler(com.adaptris.core.NullProcessingExceptionHandler) Test(org.junit.Test)

Example 3 with NullProcessingExceptionHandler

use of com.adaptris.core.NullProcessingExceptionHandler in project interlok by adaptris.

the class BasicActiveMqConsumerTest method createChannel.

private Channel createChannel(AdaptrisConnection cc, Workflow wf) throws Exception {
    Channel result = new MockChannel();
    result.setMessageErrorHandler(new NullProcessingExceptionHandler());
    result.setConsumeConnection(cc);
    result.getWorkflowList().add(wf);
    result.prepare();
    return result;
}
Also used : MockChannel(com.adaptris.core.stubs.MockChannel) MockChannel(com.adaptris.core.stubs.MockChannel) Channel(com.adaptris.core.Channel) NullProcessingExceptionHandler(com.adaptris.core.NullProcessingExceptionHandler)

Example 4 with NullProcessingExceptionHandler

use of com.adaptris.core.NullProcessingExceptionHandler in project interlok by adaptris.

the class JettyHelper method createChannel.

public static Channel createChannel(AdaptrisConnection connection, Workflow... workflows) throws Exception {
    Channel result = new MockChannel();
    result.setUniqueId("channel");
    result.registerEventHandler(createEventHandler());
    result.setMessageErrorHandler(new NullProcessingExceptionHandler());
    result.setConsumeConnection(connection);
    for (Workflow w : workflows) {
        result.getWorkflowList().add(w);
    }
    return result;
}
Also used : MockChannel(com.adaptris.core.stubs.MockChannel) MockChannel(com.adaptris.core.stubs.MockChannel) Channel(com.adaptris.core.Channel) StandardWorkflow(com.adaptris.core.StandardWorkflow) Workflow(com.adaptris.core.Workflow) NullProcessingExceptionHandler(com.adaptris.core.NullProcessingExceptionHandler)

Aggregations

Channel (com.adaptris.core.Channel)4 NullProcessingExceptionHandler (com.adaptris.core.NullProcessingExceptionHandler)4 MockChannel (com.adaptris.core.stubs.MockChannel)4 DefaultEventHandler (com.adaptris.core.DefaultEventHandler)1 StandardWorkflow (com.adaptris.core.StandardWorkflow)1 Workflow (com.adaptris.core.Workflow)1 WorkflowImp (com.adaptris.core.WorkflowImp)1 GuidGenerator (com.adaptris.util.GuidGenerator)1 Test (org.junit.Test)1