Package org.apache.hivemind.definition.impl

Examples of org.apache.hivemind.definition.impl.ImplementationDefinitionImpl


    {
        InstanceBuilder builder = id.getInstanceBuilder();
        List interceptors = id.getInterceptors();

        if (builder != null) {
            ImplementationDefinitionImpl implementation = new ImplementationDefinitionImpl(
                    sourceModule, builder.getLocation(), builder.createConstructor(sourceModule.getId()),
                    builder.getServiceModel(), false);
            sourceModule.addImplementation(qualifiedPointId, implementation);
        }
       
View Full Code Here


        if (builder == null && interceptors == null)
            return;

        if (builder != null) {
            ImplementationDefinition implementation = new ImplementationDefinitionImpl(
                    module, builder.getLocation(), builder.createConstructor(module.getId()),
                    builder.getServiceModel(), false);
            point.addImplementation(implementation);
        }
        if (interceptors == null)
View Full Code Here

        MockControl modulec = newControl(Module.class);
        Module module = (Module) modulec.getMock();

        ModuleDefinition moduleDef = createModuleDefinition("foo");
        ServicePointDefinitionImpl definition = new ServicePointDefinitionImpl(moduleDef, "bar", l, Visibility.PUBLIC, "java.util.List");
        definition.addImplementation(new ImplementationDefinitionImpl(moduleDef, l, null, "fred", true));
        ServicePointImpl sp = new ServicePointImpl(module, definition);

        Object service = new ArrayList();

        MockControl factoryc = newControl(ServiceModelFactory.class);
View Full Code Here

        ModuleDefinitionImpl module = createModuleDefinition("hivemind.tests.serviceByInterface");
        definition.addModule(module);
       
        ServicePointDefinitionImpl sp1 = createServicePointDefinition(module, "BeanInterface", BeanInterface.class);
        ImplementationDefinition impl = new ImplementationDefinitionImpl(module, newLocation(),
                constructor, ServiceModel.SINGLETON, true);
        sp1.addImplementation(impl);
        module.addServicePoint(sp1);
        Registry reg = buildFrameworkRegistry(module);
        return reg;
View Full Code Here

        new InterceptorStackImpl(null, mockServicePoint, null).toString();

        ModuleDefinition md = new ModuleDefinitionImpl("module", null, null, null);
        ServicePointDefinitionImpl spd = new ServicePointDefinitionImpl(md, "service", null,
                Visibility.PUBLIC, Runnable.class.getName());
        ImplementationDefinition sid = new ImplementationDefinitionImpl(md,
                null, null, ServiceModel.PRIMITIVE, true);
        spd.addImplementation(sid);
        new ServicePointImpl(module, spd).toString();
    }
View Full Code Here

        module.addServicePoint(spd);

        ImplementationConstructor constructor = new MethodCallImplementationConstructor(location,
                method, instanceProvider);

        ImplementationDefinition sid = new ImplementationDefinitionImpl(module, location,
                constructor, service.serviceModel(), true);

        spd.addImplementation(sid);

    }
View Full Code Here

                RunnableImpl result = new RunnableImpl();
                result.setType(serviceModel);
                return result;
            }};
       
        ImplementationDefinition impl = new ImplementationDefinitionImpl(module, newLocation(),
                constructor, serviceModel, true);
        sp1.addImplementation(impl);
        module.addServicePoint(sp1);
        return buildFrameworkRegistry(module);
    }
View Full Code Here

    /**
     * Convenience method for creating a {@link ImplementationDefinition}.
     */
    protected ImplementationDefinition createServiceImplementationDefinition(ModuleDefinition module, Class serviceImplementationClass)
    {
        ImplementationDefinition result = new ImplementationDefinitionImpl(module, newLocation(),
                new CreateClassServiceConstructor(newLocation(), serviceImplementationClass.getName()),
                "singleton", true);

        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.definition.impl.ImplementationDefinitionImpl

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.