Package org.apache.aries.blueprint.di

Examples of org.apache.aries.blueprint.di.ExecutionContext$Holder


   
   
    /** {@inheritDoc}*/
    public List<String> getBeanNamesOfType(Class<?> type) {
        Set<String> names = new LinkedHashSet<String>();
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)container.getRepository());
        try {
            for (String s : container.getComponentIds()) {
                Recipe r = container.getRepository().getRecipe(s);
                if (r instanceof BeanRecipe
View Full Code Here


    /** {@inheritDoc}*/
    public <T> Collection<? extends T> getBeansOfType(Class<T> type) {
        List<T> list = new ArrayList<T>();
       
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)container.getRepository());
        try {
            for (String s : container.getComponentIds()) {
                Recipe r = container.getRepository().getRecipe(s);
                if (r instanceof BeanRecipe
View Full Code Here

    /** {@inheritDoc}*/
    public <T> boolean loadBeansOfType(Class<T> type, BeanLoaderListener<T> listener) {
        List<String> names = new ArrayList<String>();
        boolean loaded = false;
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)container.getRepository());
        try {
            for (String s : container.getComponentIds()) {
                Recipe r = container.getRepository().getRecipe(s);
                if (r instanceof BeanRecipe
View Full Code Here

        }
        return loaded || orig.loadBeansOfType(type, listener);
    }

    public boolean hasConfiguredPropertyValue(String beanName, String propertyName, String value) {
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)container.getRepository());
        try {
            Recipe r = container.getRepository().getRecipe(beanName);
            if (r instanceof BeanRecipe) {
                BeanRecipe br = (BeanRecipe)r;
View Full Code Here

            throw new ComponentDefinitionException("Unable to convert instance " + name, e);
        }
    }
       
    public Object create(String name) throws ComponentDefinitionException {
        ExecutionContext oldContext = ExecutionContext.Holder.setContext(this);
        try {
            Object instance = createInstance(name);                      
            return convert(name, instance);
        } finally {
            ExecutionContext.Holder.setContext(oldContext);
View Full Code Here

            ExecutionContext.Holder.setContext(oldContext);
        }
    }
   
    public Map<String, Object> createAll(Collection<String> names) throws ComponentDefinitionException {
        ExecutionContext oldContext = ExecutionContext.Holder.setContext(this);
        try {
            Map<String, Object> instances = createInstances(names);
            for (String name : instances.keySet()) {
                Object obj = instances.get(name);
                instances.put(name, convert(name, obj));
View Full Code Here

        }
        return recipes;
    }

    public Set<Recipe> getAllRecipes(String... names) {
        ExecutionContext oldContext = ExecutionContext.Holder.setContext(this);
        try {
            Set<Recipe> allRecipes = new HashSet<Recipe>();
            Collection<String> topLevel = names != null && names.length > 0 ? Arrays.asList(names) : recipes.keySet();
            for (String name : topLevel) {
                internalGetAllRecipes(allRecipes, getRecipe(name));
View Full Code Here

   
   
    /** {@inheritDoc}*/
    public List<String> getBeanNamesOfType(Class<?> type) {
        Set<String> names = new LinkedHashSet<String>();
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)container.getRepository());
        try {
            for (String s : container.getComponentIds()) {
                Recipe r = container.getRepository().getRecipe(s);
                if (r instanceof BeanRecipe && ((BeanRecipe)r).getType() != null
View Full Code Here

    /** {@inheritDoc}*/
    public <T> Collection<? extends T> getBeansOfType(Class<T> type) {
        List<T> list = new ArrayList<T>();
       
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)container.getRepository());
        try {
            for (String s : container.getComponentIds()) {
                Recipe r = container.getRepository().getRecipe(s);
                if (r instanceof BeanRecipe && ((BeanRecipe)r).getType() != null
View Full Code Here

    /** {@inheritDoc}*/
    public <T> boolean loadBeansOfType(Class<T> type, BeanLoaderListener<T> listener) {
        List<String> names = new ArrayList<String>();
        boolean loaded = false;
        ExecutionContext origContext
            = ExecutionContext.Holder.setContext((ExecutionContext)container.getRepository());
        try {
            for (String s : container.getComponentIds()) {
                Recipe r = container.getRepository().getRecipe(s);
                if (r instanceof BeanRecipe && ((BeanRecipe)r).getType() != null
View Full Code Here

TOP

Related Classes of org.apache.aries.blueprint.di.ExecutionContext$Holder

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.