Examples of DelegatingServiceRegistry


Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

    private ServiceRegistry serviceRegistry;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        serviceRegistry = new DelegatingServiceRegistry();
    }
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        classes = new Class[]{String.class};
        exporter = new ServiceArrayRegistryExporter();
        registry = new DelegatingServiceRegistry();
        beanFactory = createMock(DefaultListableBeanFactory.class);
        exporter.setBeanFactory(beanFactory);
        exporter.setModuleDefinition(new SimpleModuleDefinition("module1"));
        exporter.setServiceRegistry(registry);
        exporter.setBeanClassLoader(ClassUtils.getDefaultClassLoader());
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

    private ServiceRegistry serviceRegistry;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        serviceRegistry = new DelegatingServiceRegistry();
    }
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

import org.impalaframework.spring.service.registry.config.ServiceRegistryPostProcessor;

public class ServiceRegistryPostProcessorTest extends TestCase {

    public final void testPostProcessBeforeInitialization() {
        ServiceRegistry registry = new DelegatingServiceRegistry();
        ProxyFactoryCreator proxyFactoryCreator = new DefaultProxyFactoryCreator();
        ServiceRegistryPostProcessor postProcessor = new ServiceRegistryPostProcessor(registry, proxyFactoryCreator);
        TestRegistryAware testAware = new TestRegistryAware();
        TestProxyFactoryCreatorAware proxyFactoryCreatorAware = new TestProxyFactoryCreatorAware();
        postProcessor.postProcessBeforeInitialization(testAware, null);
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

    private FilteredServiceProxyFactoryBean factoryBean;

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        serviceRegistry = new DelegatingServiceRegistry();
        factoryBean = new FilteredServiceProxyFactoryBean();
        factoryBean.setServiceRegistry(serviceRegistry);
        factoryBean.setFilterExpression("(name=*)");
        factoryBean.setProxyTypes(new Class[]{List.class});
    }
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        bean = new NamedServiceProxyFactoryBean();
        serviceRegistry = new DelegatingServiceRegistry();
       
        proxyFactoryCreator = new DefaultProxyFactoryCreator();
        bean.setServiceRegistry(serviceRegistry);
       
        classLoader = ClassUtils.getDefaultClassLoader();
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        bean = new TypedServiceProxyFactoryBean();
        serviceRegistry = new DelegatingServiceRegistry();
        bean.setServiceRegistry(serviceRegistry);
       
        classLoader = ClassUtils.getDefaultClassLoader();
        exportTypes = new Class<?>[] { Child.class };
        proxyClassTypes = new Class<?>[] { TestChild.class };
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

        UnloadTransitionProcessor unloadTransitionProcessor = new UnloadTransitionProcessor();
        transitionProcessors.addItem(Transition.UNLOADED_TO_LOADED, loadTransitionProcessor);
        transitionProcessors.addItem(Transition.LOADED_TO_UNLOADED, unloadTransitionProcessor);
        transitionManager.setTransitionProcessorRegistry(transitionProcessors);    

        ApplicationManager applicationManager = TestApplicationManager.newApplicationManager(new ModuleClassLoaderRegistry(), moduleStateHolder, new DelegatingServiceRegistry());
        Application application = applicationManager.getCurrentApplication();
       
        RootModuleDefinition test1Definition = newTest1().getModuleDefinition();
        ModificationExtractor calculator = new StrictModificationExtractor();
        TransitionSet transitions = calculator.getTransitions(application, null, test1Definition);
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

        assertTrue(list.remove(ref1));
        assertTrue(list.isEmpty());
    }
   
    public void testWithListener() throws Exception {
        DelegatingServiceRegistry registry = new DelegatingServiceRegistry();
        list.setServiceRegistry(registry);
        list.setFilterExpression("(mapkey=*)");

        List<String> service1 = new ArrayList<String>();
        List<String> service2 = new ArrayList<String>();
        List<String> service3 = new ArrayList<String>();
       
        ClassLoader classLoader = ClassUtils.getDefaultClassLoader();
        registry.addService("bean1", "module1", new StaticServiceBeanReference(service1), null, Collections.singletonMap("mapkey", "bean1"), classLoader);
        registry.addService("bean2", "module1", new StaticServiceBeanReference(service2), null, Collections.singletonMap("mapkey", "bean2"), classLoader);
       
        assertTrue(list.isEmpty());
       
        //now call init to add
        list.init();
       
        assertEquals(2, list.size());
       
        //now add service and see it automatically reflect
        registry.addService("bean3", "module1", new StaticServiceBeanReference(service3), null, Collections.singletonMap("mapkey", "bean3"), classLoader);
        assertEquals(3, list.size());
       
        list.destroy();
        assertTrue(list.isEmpty());       
       
        //no need to remove listener as this was removed via destroy
        assertFalse(registry.removeEventListener(list));
    }
View Full Code Here

Examples of org.impalaframework.service.registry.internal.DelegatingServiceRegistry

        super.setUp();
        map = new ContributionMap<Object>();
        serviceRegistryMap = new ServiceRegistryMap<Object>();
        map.setExternalContributions(serviceRegistryMap);
        serviceRegistryMap.setFilterExpression("(mapkey=*)");
        registry = new DelegatingServiceRegistry();
        serviceRegistryMap.setServiceRegistry(registry);
        classLoader = ClassUtils.getDefaultClassLoader();
    }
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.