Examples of stop()


Examples of org.springframework.batch.core.launch.JobOperator.stop()

        .addLong("test", 1L)
        .toJobParameters());

    Thread.sleep(1000);

    jobOperator.stop(jobExecution.getId());

    while(jobExecution.isRunning()) {
      // wait for async launched job to complete execution
    }
View Full Code Here

Examples of org.springframework.context.ConfigurableApplicationContext.stop()

    ConfigurableApplicationContext ac = new ClassPathXmlApplicationContext("META-INF/spring/integration/sequentialFileProcessing-config.xml");
    PollableChannel filesOutChannel = ac.getBean("filesOutChannel", PollableChannel.class);
    for (int i = 0; i < fileCount; i++) {
      logger.info("Finished processing " + filesOutChannel.receive(10000).getPayload());
    }
    ac.stop();
  }
  @Test
  public void testConcurrentFileProcessing() throws Exception {
    logger.info("\n\n#### Starting Concurrent processing test #### ");
    logger.info("Populating directory with files");
View Full Code Here

Examples of org.springframework.context.Lifecycle.stop()

        support.getBean("ConfigurationContext", ConfigurationFactory.class).configure(args);
        lifecycle = support.getBean("LifeCycle", Lifecycle.class);

        lifecycle.start();
        lifecycle.stop();
    }

}
View Full Code Here

Examples of org.springframework.context.annotation.AnnotationConfigApplicationContext.stop()

    container.run();
    assertThat(stateWrapper.state, is(ContainerState.COMPLETED));
    assertThat(stateWrapper.exit, instanceOf(Integer.class));
    assertThat((Integer)stateWrapper.exit, is(0));

    context.stop();
  }

  @Test
  public void testContainerBooleanBean() {
    @SuppressWarnings("resource")
View Full Code Here

Examples of org.springframework.context.support.AbstractApplicationContext.stop()

            new ClassPathXmlApplicationContext(new String[]{"/META-INF/spring/camelContext.xml"});
        CamelContext camelContext = applicationContext.getBean("camelContext", CamelContext.class);
        assertNotNull("The camel context should not be null", camelContext);
        Thread.sleep(2000);       
        camelContext.stop();
        applicationContext.stop();
    }

}
View Full Code Here

Examples of org.springframework.context.support.AbstractXmlApplicationContext.stop()

        MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
        mock.expectedMinimumMessageCount(2);

        mock.assertIsSatisfied();

        app.stop();
       
        log.info("Restarting ...");
        log.info("Restarting ...");
        log.info("Restarting ...");
View Full Code Here

Examples of org.springframework.context.support.ClassPathXmlApplicationContext.stop()

                           logger.debug("Running test ...");
                           if (checker != null)
                              checker.check(actx);
                           logger.debug("Done with test, stopping the application context ...");

                           actx.stop();
                           actx.destroy();

                           assertTrue(waitingForShutdown.waitForShutdownDoneLatch.await(baseTimeoutMillis, TimeUnit.MILLISECONDS));
                           assertTrue(waitingForShutdown.shutdown);
View Full Code Here

Examples of org.springframework.context.support.FileSystemXmlApplicationContext.stop()

    if (factory.containsSingleton(name)) {
      log.debug("Context found in parent, destroying: {}", name);
      FileSystemXmlApplicationContext ctx = (FileSystemXmlApplicationContext) factory.getSingleton(name);
      if (ctx.isRunning()) {
        log.debug("Context was running, attempting to stop");
        ctx.stop();
      }
      if (ctx.isActive()) {
        log.debug("Context is active, attempting to close");
        ctx.close();
      } else {
View Full Code Here

Examples of org.springframework.context.support.GenericApplicationContext.stop()

    postProcessor.postProcessAfterInitialization(testBean, "testBean");
    context.refresh();
    assertTrue(context.containsBean("testBean.test.onContainerStart"));
    Object endpoint = context.getBean("testBean.test.onContainerStart");
    assertTrue(endpoint instanceof ContainerHandler);
    context.stop();
  }

  @YarnComponent
  private static class TestBean {
View Full Code Here

Examples of org.springframework.context.support.StaticApplicationContext.stop()

    LifecycleListener listener = (LifecycleListener) context.getBean("listener");
    assertFalse(lifecycleBean.isRunning());
    context.start();
    assertTrue(lifecycleBean.isRunning());
    assertEquals(0, listener.getStoppedCount());   
    context.stop();
    assertFalse(lifecycleBean.isRunning());
    assertEquals(1, listener.getStoppedCount());
    assertSame(context, listener.getApplicationContext());
  }
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.