Package org.jboss.msc.value

Examples of org.jboss.msc.value.ConstructedValue


                final Constructor<?> constructor = interceptorIndex.getConstructor(EMPTY_CLASS_ARRAY);
                if (constructor == null) {
                    throw MESSAGES.defaultConstructorNotFoundOnComponent(interceptorClassName, configuration.getComponentClass());
                }

                instantiators.addFirst(new ManagedReferenceInterceptorFactory(new ValueManagedReferenceFactory(new ConstructedValue(constructor, Collections.<Value<?>>emptyList())), contextKey));
                destructors.addLast(new ManagedReferenceReleaseInterceptorFactory(contextKey));

                final boolean interceptorHasLifecycleCallbacks = interceptorWithLifecycleCallbacks.contains(interceptorDescription);

                new ClassDescriptionTraversal(interceptorClass.getModuleClass(), applicationClasses) {
View Full Code Here


            return this.aroundTimeoutInterceptorFactories;
        }

        private InterceptorFactory createInterceptorFactoryForContainerInterceptor(final Method method, final Constructor interceptorConstructor) {
            // The managed reference is going to be ConstructedValue, using the container-interceptor's constructor
            final ConstructedValue interceptorInstanceValue = new ConstructedValue(interceptorConstructor, Collections.<Value<?>>emptyList());
            // we *don't* create multiple instances of the container-interceptor class, but we just reuse a single instance and it's *not*
            // tied to the EJB component instance lifecycle.
            final CachedValue cachedInterceptorInstanceValue = new CachedValue(interceptorInstanceValue);
            // ultimately create the managed reference which is backed by the CachedValue
            final ManagedReference interceptorInstanceRef = new ValueManagedReference(cachedInterceptorInstanceValue);
View Full Code Here

        final List<? extends Value<?>> args = Collections.emptyList();
        final ServiceName beanServiceName = JBOSS_MC_POJO.append(beanConfig.getName());
        // TODO - decide if we really need NOT_INSTALLED and DESCRIBED stages
        // INSTANTIATED stage
        final ServiceName instantiatedServiceName = beanServiceName.append(BeanState.INSTANTIATED.name());
        final ValueService<T> instantiatedService = new ValueService<T>(new ConstructedValue(constructor, args));
        final ServiceBuilder<T> instantiatedServiceBuilder = serviceTarget.addService(instantiatedServiceName, instantiatedService);
        // TODO - add declared dependencies and injections for this stage -here-
        instantiatedServiceBuilder.install();
        // CONFIGURED stage
        final ServiceName configuredServiceName = beanServiceName.append(BeanState.CONFIGURED.name());
View Full Code Here

                constructorSignature.add(attributeTypeValue);
            }
        }

        final Value<Constructor> constructorValue = cached(new LookupConstructorValue(classValue, constructorSignature));
        final Value<Object> constructedValue = cached(new ConstructedValue(constructorValue, constructorArguments));

        final CreateDestroyService<Object> createDestroyService = new CreateDestroyService<Object>(constructedValue);
        final StartStopService<Object> startStopService = new StartStopService<Object>(constructedValue);

        final String serviceName = serviceConfig.getName();
View Full Code Here

            return this.aroundTimeoutInterceptorFactories;
        }

        private InterceptorFactory createInterceptorFactoryForContainerInterceptor(final Method method, final Constructor interceptorConstructor) {
            // The managed reference is going to be ConstructedValue, using the container-interceptor's constructor
            final ConstructedValue interceptorInstanceValue = new ConstructedValue(interceptorConstructor, Collections.<Value<?>>emptyList());
            // we *don't* create multiple instances of the container-interceptor class, but we just reuse a single instance and it's *not*
            // tied to the EJB component instance lifecycle.
            final CachedValue cachedInterceptorInstanceValue = new CachedValue(interceptorInstanceValue);
            // ultimately create the managed reference which is backed by the CachedValue
            final ManagedReference interceptorInstanceRef = new ValueManagedReference(cachedInterceptorInstanceValue);
View Full Code Here

                if (constructor == null) {
                    throw MESSAGES.defaultConstructorNotFoundOnComponent(interceptorClassName, configuration.getComponentClass());
                }


                instantiators.addFirst(new ManagedReferenceInterceptorFactory(new ValueManagedReferenceFactory(new ConstructedValue(constructor, Collections.<Value<?>>emptyList())), contextKey));
                destructors.addLast(new ManagedReferenceReleaseInterceptorFactory(contextKey));

                final boolean interceptorHasLifecycleCallbacks = interceptorWithLifecycleCallbacks.contains(interceptorDescription);

                new ClassDescriptionTraversal(interceptorClass.getModuleClass(), applicationClasses) {
View Full Code Here

                final Constructor<?> constructor = interceptorIndex.getConstructor(EMPTY_CLASS_ARRAY);
                if (constructor == null) {
                    throw MESSAGES.defaultConstructorNotFoundOnComponent(interceptorClassName, configuration.getComponentClass());
                }

                instantiators.addFirst(new ManagedReferenceInterceptorFactory(new ValueManagedReferenceFactory(new ConstructedValue(constructor, Collections.<Value<?>>emptyList())), contextKey));
                destructors.addLast(new ManagedReferenceReleaseInterceptorFactory(contextKey));

                final boolean interceptorHasLifecycleCallbacks = interceptorWithLifecycleCallbacks.contains(interceptorDescription);

                new ClassDescriptionTraversal(interceptorClass.getModuleClass(), applicationClasses) {
View Full Code Here

                constructorSignature.add(attributeTypeValue);
            }
        }

        final Value<Constructor<?>> constructorValue = cached(new LookupConstructorValue(classValue, constructorSignature));
        final Value<Object> constructedValue = cached(new ConstructedValue(constructorValue, constructorArguments));

        final CreateDestroyService<Object> createDestroyService = new CreateDestroyService<Object>(constructedValue);
        final StartStopService<Object> startStopService = new StartStopService<Object>(constructedValue);

        final String serviceName = serviceConfig.getName();
View Full Code Here

                final Constructor<?> constructor = interceptorIndex.getConstructor(EMPTY_CLASS_ARRAY);
                if (constructor == null) {
                    throw MESSAGES.defaultConstructorNotFoundOnComponent(interceptorClassName, configuration.getComponentClass());
                }

                instantiators.addFirst(new ManagedReferenceInterceptorFactory(new ValueManagedReferenceFactory(new ConstructedValue(constructor, Collections.<Value<?>>emptyList())), contextKey));
                destructors.addLast(new ManagedReferenceReleaseInterceptorFactory(contextKey));

                final boolean interceptorHasLifecycleCallbacks = interceptorWithLifecycleCallbacks.contains(interceptorDescription);

                new ClassDescriptionTraversal(interceptorClass.getModuleClass(), applicationClasses) {
View Full Code Here

                if (constructor == null) {
                    throw MESSAGES.defaultConstructorNotFoundOnComponent(interceptorClassName, configuration.getComponentClass());
                }


                instantiators.addFirst(new ManagedReferenceInterceptorFactory(new ValueManagedReferenceFactory(new ConstructedValue(constructor, Collections.<Value<?>>emptyList())), contextKey));
                destructors.addLast(new ManagedReferenceReleaseInterceptorFactory(contextKey));

                final boolean interceptorHasLifecycleCallbacks = interceptorWithLifecycleCallbacks.contains(interceptorDescription);

                new ClassDescriptionTraversal(interceptorClass.getModuleClass(), applicationClasses) {
View Full Code Here

TOP

Related Classes of org.jboss.msc.value.ConstructedValue

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.