Example usage for org.springframework.context.support AbstractXmlApplicationContext stop

List of usage examples for org.springframework.context.support AbstractXmlApplicationContext stop

Introduction

In this page you can find the example usage for org.springframework.context.support AbstractXmlApplicationContext stop.

Prototype

@Override
    public void stop() 

Source Link

Usage

From source file:org.jboss.fuse.camel.c24io.spring.SpringTestHelper.java

public static CamelContext createSpringCamelContext(CamelTestSupport test, String classpathUri)
        throws Exception {
    test.setUseRouteBuilder(false);/*from   www . ja v  a  2  s.  co  m*/

    final AbstractXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(classpathUri);
    test.setCamelContextService(new Service() {
        public void start() throws Exception {
            applicationContext.start();
        }

        public void stop() throws Exception {
            applicationContext.stop();
        }
    });

    return SpringCamelContext.springCamelContext(applicationContext);
}