Package org.impalaframework.service

Examples of org.impalaframework.service.StaticServiceBeanReference


    public StaticServiceRegistryEntry(Object service,
            String beanName,
            String contributingModule,
            ClassLoader classLoader) {
        super(new StaticServiceBeanReference(service), beanName, contributingModule, classLoader);
    }
View Full Code Here


            String beanName,
            String contributingModule,
            List<Class<?>> exportTypes,
            Map<String, ?> attributes,
            ClassLoader classLoader) {
        super(new StaticServiceBeanReference(service), beanName, contributingModule, exportTypes, attributes,
                classLoader);
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public void testCreateDestroy() throws Exception {
       
        ArrayList<String> service = new ArrayList<String>();
        serviceRegistry.addService("beanName", "moduleName", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), ClassUtils.getDefaultClassLoader());
       
        factoryBean.afterPropertiesSet();
        Object object = factoryBean.getObject();
        assertNotNull(object);
       
View Full Code Here

    @SuppressWarnings("unchecked")
    public void testClassProxy() throws Exception {

        factoryBean.setProxyTypes(new Class[]{ArrayList.class});
        ArrayList<String> service = new ArrayList<String>();
        serviceRegistry.addService("beanName", "moduleName", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), ClassUtils.getDefaultClassLoader());
       
        factoryBean.afterPropertiesSet();
        Object object = factoryBean.getObject();
        assertNotNull(object);
       
View Full Code Here

       
        //no service
        noService(list);

        //add service and see we can call
        ServiceRegistryEntry reference = serviceRegistry.addService("beanName", "moduleName", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), ClassUtils.getDefaultClassLoader());
      
        list.add("some string");
        list.add("some string");
       
        //remove registry
View Full Code Here

        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();
        }
        catch (NoServiceException e) {
            e.printStackTrace();
        }

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

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

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

            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();
        }
        catch (NoServiceException e) {
            e.printStackTrace();
        }
       
        //register using bean name too
        serviceRegistry.addService("mybean", "moduleName"new StaticServiceBeanReference(service), Arrays.asList(exportTypes) , null, classLoader);
        child.childMethod();
   
View Full Code Here

        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

        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

TOP

Related Classes of org.impalaframework.service.StaticServiceBeanReference

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.