Package org.mokai.impl.camel

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


  @Test
  public void testCreateRemoveApplication() throws Exception {
    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

    try {
      routingEngine.start();

      Connector connector = mock(Connector.class);

      ConnectorService cs1 = routingEngine.addApplication("test1", connector);
      cs1.start();
View Full Code Here


  @Test
  public void testCreateConfigurableApplication() throws Exception {
    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

    try {
      routingEngine.start();
      Connector connector = mock(Connector.class, withSettings().extraInterfaces(Configurable.class));
      routingEngine.addApplication("test1", connector);

      verify((Configurable) connector).configure();
    } finally {
View Full Code Here

  public void testRetrieveApplication() throws Exception {
    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

    try {
      routingEngine.start();

      Connector connector = mock(Connector.class);

      // create and start an application
      ConnectorService connectorService = routingEngine.addApplication("test", connector);
View Full Code Here

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

      long startTime = new Date().getTime();
      routingEngine.start();
      long endTime = new Date().getTime();

      Assert.assertTrue((endTime - startTime) < 5000);
    } finally {
      routingEngine.shutdown();
View Full Code Here

    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

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

      // create the connection
      MockProcessor processor = new MockProcessor();
      ConnectorService connection = routingEngine.addConnection("1", processor);
      connection.addAcceptor(new MockAcceptor());
View Full Code Here

    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

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

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

    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

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

      // create the processor
      MockProcessor processor = new MockProcessor();
      ConnectorService processorService = routingEngine.addConnection("1", processor);
      processorService.addAcceptor(new Acceptor() {
View Full Code Here

    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

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

      // create the processor
      MockProcessor processor = new MockProcessor();
      ConnectorService processorService = routingEngine.addConnection("1", processor);
      processorService.addAcceptor(new Acceptor() {
View Full Code Here

    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

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

      // create the processors
      Processor connectionProcessor = mock(Processor.class);
      Processor applicationProcessor = mock(Processor.class);
View Full Code Here

  @Test
  public void testCreateRemoveConnection() throws Exception {
    CamelRoutingEngine routingEngine = new CamelRoutingEngine();

    try {
      routingEngine.start();

      Connector connector = mock(Connector.class);

      // create a connector service
      ConnectorService cs1 = routingEngine.addConnection("test1", connector).withPriority(2000);
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.