Examples of Child


Examples of org.impalaframework.spring.module.impl.Child

        checkInitialized(parent, childOfChild, "another");
       
    }

    private void checkDestroyed(ClassPathXmlApplicationContext parent, String beanName) {
        Child bean = (Child) parent.getBean(beanName);
        try {
            bean.childMethod();fail();
        }
        catch (NoServiceException e) {
            assertEquals("No service available for bean " + beanName, e.getMessage());
        }
    }
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

        assertTrue(beanFromChild instanceof ChildBean);
        assertTrue(beanFromRoot instanceof Child);
        assertFalse(beanFromRoot instanceof ChildBean);
       
        Child bean = (Child) parent.getBean(beanName);
        bean.childMethod();
    }
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

    public void testWithBeanName() throws Exception {
        bean.setProxyTypes(new Class[] { Child.class });
        bean.setBeanName("someBean");
        bean.afterPropertiesSet();

        Child child = (Child) bean.getObject();

        try {
            child.childMethod();
            fail();
        }
        catch (NoServiceException e) {
        }
       
        //now register using types. Will still not be able to find
        Child service = newChild();
        serviceRegistry.addService(null, "moduleName"new StaticServiceBeanReference(service), Arrays.asList(exportTypes) , null, classLoader);
        try {
            child.childMethod();
            fail();
        }
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

        bean.setProxyTypes(new Class[] { Child.class });
        bean.setBeanName("someBean");
        bean.setExportName("exportBean");
        bean.afterPropertiesSet();

        Child child = (Child) bean.getObject();

        try {
            child.childMethod();
            fail();
        }
        catch (NoServiceException e) {
            e.printStackTrace();
        }

        Child service = newChild();
        serviceRegistry.addService("exportBean", "moduleName"new StaticServiceBeanReference(service), classLoader);
        child.childMethod();
    }
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

        proxyFactoryCreator.setAllowNoService(true);
        bean.setProxyFactoryCreator(proxyFactoryCreator);
       
        bean.afterPropertiesSet();

        Child child = (Child) bean.getObject();
        child.childMethod();
    }
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

        Child child = (Child) bean.getObject();
        child.childMethod();
    }

    private Child newChild() {
        return new Child() {
            public void childMethod() {
            }

            public Parent tryGetParent() {
                return null;
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

       
        bean.setExportName("mybean");
        bean.setExportTypes(exportTypes);
        bean.afterPropertiesSet();

        Child child = (Child) bean.getObject();

        try {
            child.childMethod();
            fail();
        }
        catch (NoServiceException e) {
            e.printStackTrace();
        }

        //create service and register using export types
        Child service = newChild();
        serviceRegistry.addService(null, "moduleName"new StaticServiceBeanReference(service), Arrays.asList(exportTypes) , null, classLoader);
        try {
            child.childMethod();
            fail();
        }
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

   
    public void testWithExportTypesOnly() throws Exception {
        bean.setExportTypes(exportTypes);
        bean.afterPropertiesSet();

        Child child = (Child) bean.getObject();

        try {
            child.childMethod();
            fail();
        }
        catch (NoServiceException e) {
            e.printStackTrace();
        }

        Child service = newChild();
        serviceRegistry.addService(null, "moduleName"new StaticServiceBeanReference(service), Arrays.asList(exportTypes) , null, classLoader);
        child.childMethod();
   
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

        }
        catch (NoServiceException e) {
            e.printStackTrace();
        }

        Child service = newChild();
        serviceRegistry.addService(null, "moduleName"new StaticServiceBeanReference(service), Arrays.asList(exportTypes) , null, classLoader);
        child.childMethod();
    }
View Full Code Here

Examples of org.impalaframework.spring.module.impl.Child

        }
        catch (NoServiceException e) {
            e.printStackTrace();
        }

        Child service = newChild();
        serviceRegistry.addService(null, "moduleName"new StaticServiceBeanReference(service), Arrays.asList(exportTypes) , null, classLoader);
        child.childMethod();
       
        //show we can also cast to one of the other interfaces
        GrandChild grandChild = (GrandChild) child;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.