Package org.mokai.impl.camel

Examples of org.mokai.impl.camel.CamelRoutingEngine.addApplication()


      // create an application
      routingEngine.addApplication("test", connector);

      // try to create another application with the same id
      routingEngine.addApplication("test", connector);
    } finally {
      routingEngine.shutdown();
    }
  }
View Full Code Here


    try {
      Processor connection = new MockServiceableConnector().withStartWaitTime(5000);
      Connector application = new MockServiceableConnector().withStartWaitTime(5000);

      routingEngine.addConnection("test", connection);
      routingEngine.addApplication("test", application);

      long startTime = new Date().getTime();
      routingEngine.start();
      long endTime = new Date().getTime();
View Full Code Here

      connection.addAcceptor(new MockAcceptor());
      connection.start();

      // create the application
      MockConnector receiver = new MockConnector();
      ConnectorService application = routingEngine.addApplication("1", receiver);
      application.start();

      // send the message
      receiver.produceMessage(new Message());
View Full Code Here

      routingEngine.setMessageStore(messageStore);
      routingEngine.start();

      // create the application
      MockProcessor processor = new MockProcessor();
      ConnectorService application = routingEngine.addApplication("1", processor);
      application.addAcceptor(new MockAcceptor());
      application.start();

      // create the connection
      MockConnector receiver = new MockConnector();
View Full Code Here

      when(connectionProcessor.supports(any(Message.class))).thenReturn(true);
      when(applicationProcessor.supports(any(Message.class))).thenReturn(true);

      ConnectorService connectionService = routingEngine.addConnection("1", connectionProcessor);
      ConnectorService applicationService = routingEngine.addApplication("1", applicationProcessor);

      Acceptor acceptor = new Acceptor() {

        @Override
        public boolean accepts(Message message) {
View Full Code Here

    try {
      routingEngine.start();
      routingEngine.setConnectorServiceChangeListener( listener );

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

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

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