Examples of yell()


Examples of com.alibaba.cooma.ext3.WrappedExt.yell()

        assertEquals(echoCount1, Ext3Wrapper1.echoCount.get());
        assertEquals(echoCount2, Ext3Wrapper2.echoCount.get());
        assertEquals(yellCount1, Ext3Wrapper1.yellCount.get());
        assertEquals(yellCount2, Ext3Wrapper2.yellCount.get());

        assertEquals("Ext3Impl2-yell", impl2.yell(config, "ha"));
        assertEquals(echoCount1, Ext3Wrapper1.echoCount.get());
        assertEquals(echoCount2, Ext3Wrapper2.echoCount.get());
        assertEquals(yellCount1, Ext3Wrapper1.yellCount.get());
        assertEquals(yellCount2, Ext3Wrapper2.yellCount.get());
    }
View Full Code Here

Examples of com.alibaba.cooma.ext3.WrappedExt.yell()

        assertEquals(echoCount1 + 1, Ext3Wrapper1.echoCount.get());
        assertEquals(echoCount2 + 1, Ext3Wrapper2.echoCount.get());
        assertEquals(yellCount1, Ext3Wrapper1.yellCount.get());
        assertEquals(yellCount2, Ext3Wrapper2.yellCount.get());

        assertEquals("Ext3Impl2-yell", impl2.yell(config, "ha"));
        assertEquals(echoCount1 + 1, Ext3Wrapper1.echoCount.get());
        assertEquals(echoCount2 + 1, Ext3Wrapper2.echoCount.get());
        assertEquals(yellCount1 + 1, Ext3Wrapper1.yellCount.get());
        assertEquals(yellCount2 + 1, Ext3Wrapper2.yellCount.get());
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt.yell()

        Map<String, String> map = new HashMap<String, String>();
        map.put("key2", "impl2");
        URL url = new URL("p1", "1.2.3.4", 1010, "path1", map);

        String echo = ext.yell(url, "haha");
        assertEquals("Ext1Impl2-yell", echo);

        url = url.addParameter("key1", "impl3"); // 注意: URL是值类型
        echo = ext.yell(url, "haha");
        assertEquals("Ext1Impl3-yell", echo);
View Full Code Here

Examples of com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt.yell()

        String echo = ext.yell(url, "haha");
        assertEquals("Ext1Impl2-yell", echo);

        url = url.addParameter("key1", "impl3"); // 注意: URL是值类型
        echo = ext.yell(url, "haha");
        assertEquals("Ext1Impl3-yell", echo);
    }

    @Test
    public void test_getAdaptiveExtension_protocolKey() throws Exception {
View Full Code Here

Examples of com.alibaba.dubbo.common.extensionloader.ext3.UseProtocolKeyExt.yell()

        {

            Map<String, String> map = new HashMap<String, String>();
            URL url = new URL(null, "1.2.3.4", 1010, "path1", map);
            String yell = ext.yell(url, "s");
            assertEquals("Ext3Impl1-yell", yell); // 缺省值

            url = url.addParameter("key2", "impl2"); // 使用第2Key, key2
            yell = ext.yell(url, "s");
            assertEquals("Ext3Impl2-yell", yell);
View Full Code Here

Examples of com.alibaba.dubbo.common.extensionloader.ext3.UseProtocolKeyExt.yell()

            URL url = new URL(null, "1.2.3.4", 1010, "path1", map);
            String yell = ext.yell(url, "s");
            assertEquals("Ext3Impl1-yell", yell); // 缺省值

            url = url.addParameter("key2", "impl2"); // 使用第2Key, key2
            yell = ext.yell(url, "s");
            assertEquals("Ext3Impl2-yell", yell);

            url = url.setProtocol("impl3"); // 使用第1Key, Protocol
            yell = ext.yell(url, "d");
            assertEquals("Ext3Impl3-yell", yell);
View Full Code Here

Examples of com.alibaba.dubbo.common.extensionloader.ext3.UseProtocolKeyExt.yell()

            url = url.addParameter("key2", "impl2"); // 使用第2Key, key2
            yell = ext.yell(url, "s");
            assertEquals("Ext3Impl2-yell", yell);

            url = url.setProtocol("impl3"); // 使用第1Key, Protocol
            yell = ext.yell(url, "d");
            assertEquals("Ext3Impl3-yell", yell);
        }
    }

    @Test
View Full Code Here

Examples of com.oldratlee.cooma.ext1.Ext1.yell()

    public void test_getAdaptiveExtension_customizeKey() throws Exception {
        Ext1 ext = ExtensionLoader.getExtensionLoader(Ext1.class).getAdaptiveExtension();

        Config config = Config.fromKv("protocol", "p1", "host", "1.2.3.4", "port", "1010", "path", "path1", "key2", "impl2");

        String echo = ext.yell(config, "haha");
        assertEquals("Ext1Impl2-yell", echo);

        config = config.addConfig("key1", "impl3");
        echo = ext.yell(config, "haha");
        assertEquals("Ext1Impl3-yell", echo);
View Full Code Here

Examples of com.oldratlee.cooma.ext1.Ext1.yell()

        String echo = ext.yell(config, "haha");
        assertEquals("Ext1Impl2-yell", echo);

        config = config.addConfig("key1", "impl3");
        echo = ext.yell(config, "haha");
        assertEquals("Ext1Impl3-yell", echo);
    }

    @Test
    public void test_getAdaptiveExtension_UrlNpe() throws Exception {
View Full Code Here

Examples of com.oldratlee.cooma.ext2.Ext2.yell()

        Ext2 ext = ExtensionLoader.getExtensionLoader(Ext2.class).getAdaptiveExtension();
       
       
        Config config = Config.fromKv("protocol", "impl1", "host", "1.2.3.4", "port", "1010", "path", "path1");

        String yell = ext.yell(config, "s");
        assertEquals("Ext2Impl1-yell", yell);
       
        config = config.addConfig("key1", "impl2");
        yell = ext.yell(config, "s");
        assertEquals("Ext2Impl2-yell", yell);
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.