Package org.apache.hivemind.service

Examples of org.apache.hivemind.service.ClassFactory


        ServicePoint sp1 = (ServicePoint) spc1.getMock();

        MockControl spc2 = newControl(ServicePoint.class);
        ServicePoint sp2 = (ServicePoint) spc2.getMock();

        ClassFactory service = (ClassFactory) newMock(ClassFactory.class);

        // Training

        sp1.getExtensionPointId();
        spc1.setReturnValue("foo.Private");
View Full Code Here


    public void testConstructDefaultRegistry() throws Exception
    {
        Registry r = RegistryBuilder.constructDefaultRegistry();

        ClassFactory factory = (ClassFactory) r.getService(
                "hivemind.ClassFactory",
                ClassFactory.class);

        assertNotNull(factory);
    }
View Full Code Here

        _serviceInterface = point.getServiceInterface();

        Class declaredInterface = point.getDeclaredInterface();

        Module module = point.getModule();
        ClassFactory factory = (ClassFactory) module.getService(
                "hivemind.ClassFactory",
                ClassFactory.class);

        boolean extendBeanClass = outerProxy && !declaredInterface.isInterface();
        Class baseClass = extendBeanClass ? declaredInterface : Object.class;

        _classFab = factory.newClass(ClassFabUtils.generateClassName(_serviceInterface), baseClass);

        if (!extendBeanClass)
            _classFab.addInterface(_serviceInterface);

        // Not exactly certain this will work with non-interface beans that already
View Full Code Here

    public void testConstructDefaultRegistry() throws Exception
    {
        Registry r = RegistryBuilder.constructDefaultRegistry();

        ClassFactory factory =
            (ClassFactory) r.getService("hivemind.ClassFactory", ClassFactory.class);

        assertNotNull(factory);
    }
View Full Code Here

        verifyControls();
    }

    public void testPassThruToPlaceholder()
    {
        ClassFactory cf = new ClassFactoryImpl();
        DefaultImplementationBuilderImpl dib = new DefaultImplementationBuilderImpl();

        dib.setClassFactory(cf);

        MockControl moduleControl = newControl(Module.class);
View Full Code Here

        verifyControls();
    }

    public void testFilterChain()
    {
        ClassFactory cf = new ClassFactoryImpl();
        DefaultImplementationBuilderImpl dib = new DefaultImplementationBuilderImpl();

        dib.setClassFactory(cf);

        MockControl moduleControl = newControl(Module.class);
View Full Code Here

        verifyControls();
    }

    public void testPipelineFactoryWithTerminator()
    {
        ClassFactory cf = new ClassFactoryImpl();
        DefaultImplementationBuilderImpl dib = new DefaultImplementationBuilderImpl();

        dib.setClassFactory(cf);

        MockControl moduleControl = newControl(Module.class);
View Full Code Here

        verifyControls();
    }

    public void testPipelineFactoryNoTerminator()
    {
        ClassFactory cf = new ClassFactoryImpl();
        DefaultImplementationBuilderImpl dib = new DefaultImplementationBuilderImpl();

        dib.setClassFactory(cf);

        MockControl moduleControl = newControl(Module.class);
View Full Code Here

        _point = point;
        _type = type;
        _serviceInterface = point.getServiceInterface();

        Module module = point.getModule();
        ClassFactory factory =
            (ClassFactory) module.getService("hivemind.ClassFactory", ClassFactory.class);

        _classFab = factory.newClass(ClassFabUtils.generateClassName(type), Object.class, module);

        _classFab.addInterface(_serviceInterface);
    }
View Full Code Here

     * much as the full framework would do at runtime.
     */

    private IPage newPage(IComponentSpecification specification, ComponentMessagesSource source, Locale locale)
    {
        ClassFactory classFactory = new ClassFactoryImpl();

        EnhancementOperationImpl op = new EnhancementOperationImpl(new DefaultClassResolver(),
                specification, BasePage.class, classFactory);

        InjectMessagesWorker injectMessages = new InjectMessagesWorker();
View Full Code Here

TOP

Related Classes of org.apache.hivemind.service.ClassFactory

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.