Examples of CloseErrorsImpl


Examples of org.apache.camel.guice.support.internal.CloseErrorsImpl

     * Closes all of the objects within the given injector of the specified
     * scope and clears the scope
     */
    public void close(Injector injector) throws CloseFailedException {
        Preconditions.checkNotNull(injector, "injector");
        CloseErrorsImpl errors = new CloseErrorsImpl(this);
        Injectors.close(injector, scopeAnnotation, errors);

        synchronized (map) {
            map.clear();
        }
        errors.throwIfNecessary();
    }
View Full Code Here

Examples of org.apache.camel.guice.support.internal.CloseErrorsImpl

    /**
     * Closes any singleton objects in the injector using the currently
     * registered {@link Closer} implementations
     */
    public static void close(Injector injector) throws CloseFailedException {
        close(injector, new CloseErrorsImpl(Injectors.class));
    }
View Full Code Here

Examples of org.apache.camel.guice.support.internal.CloseErrorsImpl

     * {@link Closer} implementations
     */
    public static void close(Injector injector,
            Class<? extends Annotation> scopeAnnotationToClose)
        throws CloseFailedException {
        close(injector, scopeAnnotationToClose, new CloseErrorsImpl(
                Injectors.class));
    }
View Full Code Here

Examples of org.apache.camel.guice.support.internal.CloseErrorsImpl

            bindScope(TestScoped.class, testScope);
        }
    }

    protected void closeInjectors() throws CloseFailedException {
        CloseErrors errors = new CloseErrorsImpl(this);
        Set<Entry<Object, Injector>> entries = injectors.entrySet();
        for (Entry<Object, Injector> entry : entries) {
            // Object key = entry.getKey();
            Injector injector = entry.getValue();
            Injectors.close(injector, errors);
        }
        injectors.clear();
        errors.throwIfNecessary();
    }
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.