Examples of lookupObject()


Examples of org.mule.api.registry.MuleRegistry.lookupObject()

    {
        MuleRegistry muleRegistry = mock(MuleRegistry.class);
        if (isPersistent)
        {
            PartitionableObjectStore<?> store = createPersistentPartitionableObjectStore(muleContext);
            when(muleRegistry.lookupObject(MuleProperties.OBJECT_STORE_DEFAULT_PERSISTENT_NAME))
                    .thenReturn(store);
        }
        else
        {
            PartitionableObjectStore<?> store = createTransientPartitionableObjectStore();
View Full Code Here

Examples of org.mule.api.registry.MuleRegistry.lookupObject()

                    .thenReturn(store);
        }
        else
        {
            PartitionableObjectStore<?> store = createTransientPartitionableObjectStore();
            when(muleRegistry.lookupObject(MuleProperties.OBJECT_STORE_DEFAULT_IN_MEMORY_NAME))
                    .thenReturn(store);
        }

        when(muleContext.getRegistry()).thenReturn(muleRegistry);
    }
View Full Code Here

Examples of org.mule.api.registry.Registry.lookupObject()

    public void testDefaultScope() throws Exception
    {
        Registry registry = muleContext.getRegistry();
       
        Object bean1 = registry.lookupObject("default");
        assertNotNull(bean1);
        String id1 = ((UniqueComponent) bean1).getId();
       
        Object bean2 = registry.lookupObject("default");
        assertNotNull(bean2);
View Full Code Here

Examples of org.mule.api.registry.Registry.lookupObject()

       
        Object bean1 = registry.lookupObject("default");
        assertNotNull(bean1);
        String id1 = ((UniqueComponent) bean1).getId();
       
        Object bean2 = registry.lookupObject("default");
        assertNotNull(bean2);
        String id2 = ((UniqueComponent) bean2).getId();
       
        assertEquals(id1, id2);
    }
View Full Code Here

Examples of org.mule.api.registry.Registry.lookupObject()

    public void testSingletonScope() throws Exception
    {
        Registry registry = muleContext.getRegistry();
       
        Object bean1 = registry.lookupObject("singleton");
        assertNotNull(bean1);
        String id1 = ((UniqueComponent) bean1).getId();
       
        Object bean2 = registry.lookupObject("singleton");
        assertNotNull(bean2);
View Full Code Here

Examples of org.mule.api.registry.Registry.lookupObject()

       
        Object bean1 = registry.lookupObject("singleton");
        assertNotNull(bean1);
        String id1 = ((UniqueComponent) bean1).getId();
       
        Object bean2 = registry.lookupObject("singleton");
        assertNotNull(bean2);
        String id2 = ((UniqueComponent) bean2).getId();
       
        assertEquals(id1, id2);
    }
View Full Code Here

Examples of org.mule.api.registry.Registry.lookupObject()

    public void testPrototypeScope() throws Exception
    {
        Registry registry = muleContext.getRegistry();
       
        Object bean1 = registry.lookupObject("prototype");
        assertNotNull(bean1);
        String id1 = ((UniqueComponent) bean1).getId();
       
        Object bean2 = registry.lookupObject("prototype");
        assertNotNull(bean2);
View Full Code Here

Examples of org.mule.api.registry.Registry.lookupObject()

       
        Object bean1 = registry.lookupObject("prototype");
        assertNotNull(bean1);
        String id1 = ((UniqueComponent) bean1).getId();
       
        Object bean2 = registry.lookupObject("prototype");
        assertNotNull(bean2);
        String id2 = ((UniqueComponent) bean2).getId();
       
        assertFalse("IDs " + id1 + " and " + id2 + " should be different", id1.equals(id2));
    }
View Full Code Here

Examples of org.mule.api.registry.Registry.lookupObject()

        Iterator it = getRegistries().iterator();
        Registry reg;
        while (it.hasNext())
        {
            reg = (Registry) it.next();
            if (!reg.isReadOnly() && reg.lookupObject(key) != null)
            {
                reg.unregisterObject(key, metadata);
                break;
            }
        }
View Full Code Here

Examples of org.mule.api.registry.Registry.lookupObject()

        Registry r = getRegistry();
        Map<String, IOException> map = r.lookupByType(IOException.class);
        assertNotNull(map);
        assertEquals(0, map.size());

        IOException object = r.lookupObject(IOException.class);
        assertNull(object);

        object = r.lookupObject("foooooo");
        assertNull(object);
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.