Package com.elevenware.redcorn.lifecycle

Examples of com.elevenware.redcorn.lifecycle.Lifecycle


        List<BeanDefinition> dependencyChain = ordering.sort();
        Visitors.constructorArgsInstantiator(this).visitAll(dependencyChain);

        for(BeanDefinition definition: context.values()) {
            if(Lifecycle.class.isAssignableFrom(definition.getType())) {
                Lifecycle lifecycle = (Lifecycle) definition.getPayload();
                lifecycle.start();
            }
            if(ContainerAware.class.isAssignableFrom(definition.getType())) {
                ((ContainerAware) definition.getPayload()).setContainer(this);
            }
        }
View Full Code Here


//        if(this.context.isEmpty()) {
//            throw new RuntimeException("No beans configured");
//        }
        for(BeanDefinition definition: context.values()) {
            if(Lifecycle.class.isAssignableFrom(definition.getType())) {
                Lifecycle lifecycle = (Lifecycle) definition.getPayload();
                lifecycle.start();
            }
            if(ContainerAware.class.isAssignableFrom(definition.getType())) {
                ((ContainerAware) definition.getPayload()).setContainer(this);
            }
        }
View Full Code Here

    @Override
    public void stop() {
        for(BeanDefinition definition: context.values()) {
            if (Lifecycle.class.isAssignableFrom(definition.getType())) {
                Lifecycle lifecycle = (Lifecycle) definition.getPayload();
                lifecycle.stop();
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.elevenware.redcorn.lifecycle.Lifecycle

Copyright © 2018 www.massapicom. 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.