Search in sources :

Example 1 with FailedMessageRetrier

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

the class FailedMessageRetrierCase method testClearWorkflows.

@Test
public void testClearWorkflows() throws Exception {
    FailedMessageRetrier retrier = create();
    retrier.addWorkflow(createWorkflow());
    retrier.addWorkflow(createWorkflow());
    retrier.clearWorkflows();
    assertEquals(0, retrier.registeredWorkflowIds().size());
}
Also used : FailedMessageRetrier(com.adaptris.core.FailedMessageRetrier) Test(org.junit.Test)

Example 2 with FailedMessageRetrier

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

the class AdapterManager method setFailedMessageRetrier.

@Override
public void setFailedMessageRetrier(String xml) throws CoreException {
    ensureState(ClosedState.getInstance());
    FailedMessageRetrier obj = (FailedMessageRetrier) DefaultMarshaller.getDefaultMarshaller().unmarshal(xml);
    LifecycleHelper.prepare(obj);
    getWrappedComponent().setFailedMessageRetrier(obj);
    registerChildRuntime(obj);
    marshalAndSendNotification();
}
Also used : FailedMessageRetrier(com.adaptris.core.FailedMessageRetrier)

Example 3 with FailedMessageRetrier

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

the class FailedMessageRetrierCase method testRegisteredWorkflowIds.

@Test
public void testRegisteredWorkflowIds() throws Exception {
    FailedMessageRetrier retrier = create();
    StandardWorkflow wf1 = createWorkflow();
    StandardWorkflow wf2 = createWorkflow();
    retrier.addWorkflow(wf1);
    retrier.addWorkflow(wf2);
    assertEquals(2, retrier.registeredWorkflowIds().size());
    assertTrue(retrier.registeredWorkflowIds().contains(wf1.obtainWorkflowId()));
    assertTrue(retrier.registeredWorkflowIds().contains(wf2.obtainWorkflowId()));
}
Also used : StandardWorkflow(com.adaptris.core.StandardWorkflow) FailedMessageRetrier(com.adaptris.core.FailedMessageRetrier) Test(org.junit.Test)

Aggregations

FailedMessageRetrier (com.adaptris.core.FailedMessageRetrier)3 Test (org.junit.Test)2 StandardWorkflow (com.adaptris.core.StandardWorkflow)1