Examples of addPostReceivingAction()


Examples of org.mokai.ConnectorService.addPostReceivingAction()

      processorService.addPostProcessingAction(action);
    }

    // add post-receiving-actions to the processor
    for (Action action : postReceivingActions) {
      processorService.addPostReceivingAction(action);
    }
  }

  private int getPriority(Element connectorElement) throws Exception {
    int priority = 1000;
View Full Code Here

Examples of org.mokai.ConnectorService.addPostReceivingAction()

    ConnectorService processorService = new MockConnectorService("test", Mockito.mock(Processor.class), resourceRegistry);

    Action configurableAction = Mockito.mock(Action.class,
        Mockito.withSettings().extraInterfaces(Configurable.class));

    processorService.addPostReceivingAction(configurableAction);
    processorService.removePostReceivingAction(configurableAction);

    Mockito.verify((Configurable) configurableAction).configure();
    Mockito.verify((Configurable) configurableAction).destroy();
  }
View Full Code Here

Examples of org.mokai.ConnectorService.addPostReceivingAction()

    processorService.addPostProcessingAction(action);
    Assert.assertNotNull(action.getMessageStore());

    // test inject resource to post-receiving action
    action = new MockAction();
    processorService.addPostReceivingAction(action);
    Assert.assertNotNull(action.getMessageStore());
  }

  @Test
  public void testInjectConnectorContext() throws Exception {
View Full Code Here

Examples of org.mokai.ConnectorService.addPostReceivingAction()

    ConnectorService processorService = new MockConnectorService("test", processor, resourceRegistry);
    processorService.start();

    // add post-receiving action
    MockAction postReceivingAction = new MockAction();
    processorService.addPostReceivingAction(postReceivingAction);

    // add another post-receiving action that changes the message
    processorService.addPostReceivingAction(new Action() {

      @Override
View Full Code Here

Examples of org.mokai.ConnectorService.addPostReceivingAction()

    // add post-receiving action
    MockAction postReceivingAction = new MockAction();
    processorService.addPostReceivingAction(postReceivingAction);

    // add another post-receiving action that changes the message
    processorService.addPostReceivingAction(new Action() {

      @Override
      public void execute(Message message) throws Exception {
        message.setReference("germanescobar");
      }
View Full Code Here

Examples of org.mokai.ConnectorService.addPostReceivingAction()

  }

  @Test(expectedExceptions=IllegalArgumentException.class)
  public void shouldFailWithNullPostReceivingAction() throws Exception {
    ConnectorService processorService = new MockConnectorService("test", new MockProcessor(), resourceRegistry);
    processorService.addPostReceivingAction(null);
  }

  /**
   * Tests that if an exception occurs in the processor, the message is sent to the failedMessages queue.
   * @throws Exception
View Full Code Here

Examples of org.mokai.ConnectorService.addPostReceivingAction()

    Action action1 = new MockAction();
    Action action2 = new MockAction();

    // add first action
    processorService.addPostReceivingAction(action1);
    Assert.assertEquals(1, processorService.getPostReceivingActions().size());

    // add second action
    processorService.addPostReceivingAction(action2);
    Assert.assertEquals(2, processorService.getPostReceivingActions().size());
View Full Code Here

Examples of org.mokai.ConnectorService.addPostReceivingAction()

    // add first action
    processorService.addPostReceivingAction(action1);
    Assert.assertEquals(1, processorService.getPostReceivingActions().size());

    // add second action
    processorService.addPostReceivingAction(action2);
    Assert.assertEquals(2, processorService.getPostReceivingActions().size());

    List<Action> postReceivingActions  = processorService.getPostReceivingActions();
    Assert.assertEquals(postReceivingActions.get(0), action1);
    Assert.assertEquals(postReceivingActions.get(1), action2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.