Package org.mokai

Examples of org.mokai.ConnectorService.stop()


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

    processorService.start();
    Assert.assertEquals(Service.State.STARTED, processorService.getState());

    processorService.stop();
    Assert.assertEquals(Service.State.STOPPED, processorService.getState());
  }

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


    // verify
    Assert.assertEquals(Service.State.STARTED, processorService.getState());
    Mockito.verify((Serviceable) processor).doStart();


    processorService.stop();

    // verify
    Assert.assertEquals(Service.State.STOPPED, processorService.getState());
    Mockito.verify((Serviceable) processor).doStop();
  }
View Full Code Here

    Mockito.doThrow(new NullPointerException()).when((Serviceable) processor).doStop();

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

    processorService.stop();
  }

  @Test
  public void testMessageStoppedProcessor() throws Exception {
    MockEndpoint outboundEndpoint = getProcessedMessagesEndpoint(2);
View Full Code Here

    Assert.assertEquals(State.STOPPED, processorService.getState());

    processorService.start();
    Assert.assertEquals(State.STARTED, processorService.getState());

    processorService.stop();
    Assert.assertEquals(State.STOPPED, processorService.getState());
  }

  /**
   * Tests that a failed processor recovers after it process a good message
View Full Code Here

    if (connectorService == null) {
      response.notFound();
      return;
    }

    connectorService.stop();
  }

  public void setRoutingEngine(RoutingEngine routingEngine) {
    this.routingEngine = routingEngine;
  }
View Full Code Here

    if (connectorService == null) {
      response.notFound();
      return;
    }

    connectorService.stop();
  }

  public void setRoutingEngine(RoutingEngine routingEngine) {
    this.routingEngine = routingEngine;
  }
View Full Code Here

      routingEngine.setConnectorServiceChangeListener( listener );

      ConnectorService cs1 = routingEngine.addConnection("test1", mock(Connector.class));

      cs1.start();
      cs1.stop();

      verify(listener, times(2)).changed(cs1, Direction.TO_CONNECTIONS);
    } finally {
      routingEngine.shutdown();
    }
View Full Code Here

      routingEngine.setConnectorServiceChangeListener( listener );

      ConnectorService cs1 = routingEngine.addApplication("test1", mock(Connector.class));

      cs1.start();
      cs1.stop();

      verify(listener, times(2)).changed(cs1, Direction.TO_APPLICATIONS);
    } finally {
      routingEngine.shutdown();
    }
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.