Package javax.enterprise.context.spi

Examples of javax.enterprise.context.spi.Contextual


    }

    public void deactivate() {
        active = false;
        for (Map.Entry<Contextual<?>, Instance> contextualInstanceEntry : storage.entrySet()) {
            Contextual contextual = contextualInstanceEntry.getKey();
            Instance instance = contextualInstanceEntry.getValue();
            contextual.destroy(instance.instance, instance.ctx);
        }
        storage.clear();
    }
View Full Code Here


    @Override
    @SuppressWarnings("unchecked")
    public void destroy(Contextual<?> contextual) {
        assertTrue(contextual instanceof Serializable); // we also test CDI-24 here
        Instance instance = storage.remove(contextual);
        @SuppressWarnings("rawtypes")
        Contextual rawContextual = contextual;
        rawContextual.destroy(instance.instance, instance.ctx);
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    protected void destroy(Contextual<?> contextual) {
        assertTrue(contextual instanceof Serializable); // we also test CDI-24 here
        Instance instance = storage.remove(contextual);
        if (instance != null) {
            @SuppressWarnings("rawtypes")
            Contextual rawContextual = contextual;
            rawContextual.destroy(instance.instance, instance.ctx);
        }
    }
View Full Code Here

            {
                for ( Entry<Contextual<?>, Object> componentEntry : componentInstanceMap.entrySet())
                {
                    // there is no nice way to explain the Java Compiler that we are handling the same type T,
                    // therefore we need completely drop the type information :( 
                    Contextual contextual = componentEntry.getKey();
                    Object instance = componentEntry.getValue();
                    CreationalContext creational = creationalContextMap.get(contextual);
                   
                    contextual.destroy(instance, creational);
                }
            }
        }
    }
View Full Code Here

                for ( Entry<String, Object> componentEntry : componentIdMap.entrySet())
                {
                    String beanId = componentEntry.getKey();
                    // there is no nice way to explain the Java Compiler that we are handling the same type T,
                    // therefore we need completely drop the type information :(
                    Contextual contextual = beanManager.getPassivationCapableBean(beanId);
                    Object instance = componentEntry.getValue();
                    CreationalContext creational = creationalContextMap.get(beanId);

                    contextual.destroy(instance, creational);
                }
            }
        }
    }
View Full Code Here

    @Override
    @SuppressWarnings("unchecked")
    public void destroy(Contextual<?> contextual) {
        assertTrue(contextual instanceof Serializable); // we also test CDI-24 here
        Instance instance = storage.remove(contextual);
        @SuppressWarnings("rawtypes")
        Contextual rawContextual = contextual;
        rawContextual.destroy(instance.instance, instance.ctx);
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public void destroy(Contextual<?> contextual) {
      destroyCalled = true;
        Instance instance = storage.remove(contextual);
        if (instance != null) {
            @SuppressWarnings("rawtypes")
            Contextual rawContextual = contextual;
            rawContextual.destroy(instance.getInstance(), instance.getCtx());
        }
    }
View Full Code Here

    @Override
    @SuppressWarnings("unchecked")
    public void destroy(Contextual<?> contextual) {
        Instance instance = storage.remove(contextual);
        @SuppressWarnings("rawtypes")
        Contextual rawContextual = contextual;
        rawContextual.destroy(instance.instance, instance.ctx);
    }
View Full Code Here

    @Override
    @SuppressWarnings("unchecked")
    public void destroy(Contextual<?> contextual) {
        Instance instance = storage.remove(contextual);
        @SuppressWarnings("rawtypes")
        Contextual rawContextual = contextual;
        rawContextual.destroy(instance.instance, instance.ctx);
    }
View Full Code Here

            {
                for ( Entry<Contextual<?>, Object> componentEntry : componentInstanceMap.entrySet())
                {
                    // there is no nice way to explain the Java Compiler that we are handling the same type T,
                    // therefore we need completely drop the type information :(
                    Contextual contextual = componentEntry.getKey();
                    Object instance = componentEntry.getValue();
                    CreationalContext creational = creationalContextMap.get(contextual);

                    contextual.destroy(instance, creational);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of javax.enterprise.context.spi.Contextual

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.