Package org.impalaframework.service

Examples of org.impalaframework.service.StaticServiceBeanReference


    private void serviceRegistryReferenceExpectations(boolean getClassLoader) {
        if (getClassLoader) {
            expect(serviceRegistryReference.getBeanClassLoader()).andReturn(ClassUtils.getDefaultClassLoader());
        }
        expect(serviceRegistryReference.getServiceBeanReference()).andReturn(new StaticServiceBeanReference(result));
    }
View Full Code Here


        assertTrue(set.isEmpty());
    }
   
    public void testWithNoExportTypes() throws Exception {
        List<String> service = new ArrayList<String>();
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), classLoader);
        set.afterPropertiesSet();
       
        assertFalse(set.isEmpty());
    }
View Full Code Here

   
    public void testWithExportTypes() throws Exception {
        set.setExportTypes(supportedTypes);
       
        List<String> service = new ArrayList<String>();
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), classLoader);
        set.afterPropertiesSet();
       
        assertTrue(set.isEmpty());
           
        //add another service which does not specify export types
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), classLoader);
        assertTrue(set.isEmpty());

        //add another service which does specify export types
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), Arrays.asList(supportedTypes), Collections.singletonMap("name", "value"), classLoader);
        assertFalse(set.isEmpty());  
    }
View Full Code Here

   
    public void testWithExportTypesBeforeInit() throws Exception {
        set.setExportTypes(supportedTypes);
       
        List<String> service = new ArrayList<String>();
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), Arrays.asList(supportedTypes), Collections.singletonMap("name", "value"), classLoader);
        set.afterPropertiesSet();
       
        assertFalse(set.isEmpty());
    }
View Full Code Here

        assertTrue(list.isEmpty());
    }
   
    public void testWithNoExportTypes() throws Exception {
        List<String> service = new ArrayList<String>();
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), classLoader);
        list.afterPropertiesSet();
       
        assertFalse(list.isEmpty());
    }
View Full Code Here

   
    public void testWithExportTypes() throws Exception {
        list.setExportTypes(supportedTypes);
       
        List<String> service = new ArrayList<String>();
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), classLoader);
        list.afterPropertiesSet();
       
        assertTrue(list.isEmpty());
           
        //add another service which does not specify export types
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), null, Collections.singletonMap("name", "value"), classLoader);
        assertTrue(list.isEmpty());

        //add another service which does specify export types
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), Arrays.asList(supportedTypes), Collections.singletonMap("name", "value"), classLoader);
        assertFalse(list.isEmpty());  
    }
View Full Code Here

   
    public void testWithExportTypesBeforeInit() throws Exception {
        list.setExportTypes(supportedTypes);
       
        List<String> service = new ArrayList<String>();
        serviceRegistry.addService("mybean", "mymodule", new StaticServiceBeanReference(service), Arrays.asList(supportedTypes), Collections.singletonMap("name", "value"), classLoader);
        list.afterPropertiesSet();
       
        assertFalse(list.isEmpty());
    }
View Full Code Here

        assertTrue(entryDelegate.deriveExportTypes("service", null, null).isEmpty());
    }
   
    private ServiceRegistryEntry registryaddService(String beanName,
            String moduleName, Object service, ClassLoader classLoader) {
        return registry.addService(beanName, moduleName, new StaticServiceBeanReference(service), classLoader);
    }
View Full Code Here

        return registry.addService(beanName, moduleName, new StaticServiceBeanReference(service), classLoader);
    }
   
    private ServiceRegistryEntry registryaddService(String beanName,
            String moduleName, Object service, List<Class<?>> exportTypes, Map<String,Object> attributes, ClassLoader classLoader) {
        return registry.addService(beanName, moduleName, new StaticServiceBeanReference(service), exportTypes, attributes, classLoader);
    }
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.