Package com.netflix.governator.lifecycle

Examples of com.netflix.governator.lifecycle.LifecycleMethods


            for ( LifecycleListener listener : manager.getListeners() ) {
                listener.objectInjected(type, obj);
            }

            Class<?> clazz = obj.getClass();
            LifecycleMethods methods = getLifecycleMethods(clazz);

            if ( warmUpIsInDag(clazz, type) ) {
                addDependencies(manager, obj, type, methods);
            }

            if ( methods.hasLifecycleAnnotations() ) {
                try {
                    manager.add(obj, methods);
                }
                catch ( Exception e ) {
                    throw new Error(e);
View Full Code Here


            applyInjectionPoint(injectionPoint, dagManager, type);
        }
    }

    private boolean warmUpIsInDag(Class<?> clazz, TypeLiteral<?> type) {
        LifecycleMethods methods = getLifecycleMethods(clazz);
        if ( methods.methodsFor(WarmUp.class).size() > 0 ) {
            return true;
        }

        if ( warmUpIsInDag(getConstructorInjectionPoint(type)) ) {
            return true;
View Full Code Here

        {
            Thread.currentThread().setContextClassLoader(obj.getClass().getClassLoader());
           
            warmUpDriver.setState(obj, LifecycleState.WARMING_UP);

            LifecycleMethods    lifecycleMethods = dagManager.getLifecycleMethods(node.getKey());
            Collection<Method>  methods = (lifecycleMethods != null) ? lifecycleMethods.methodsFor(WarmUp.class) : null;

            LifecycleState      newState = LifecycleState.ACTIVE;
            try
            {
                if ( methods != null )
View Full Code Here

        return dependenciesPreserved;
    }

    private boolean hasWarmUpMethod(final Object bridge)
    {
        final LifecycleMethods lifecycleMethods = keyToLifecycle.get(bridge);
        return null != lifecycleMethods && !lifecycleMethods.methodsFor(WarmUp.class).isEmpty();
    }
View Full Code Here

TOP

Related Classes of com.netflix.governator.lifecycle.LifecycleMethods

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.