本文整理汇总了Java中com.alibaba.dubbo.common.extensionloader.ext2.UrlHolder类的典型用法代码示例。如果您正苦于以下问题:Java UrlHolder类的具体用法?Java UrlHolder怎么用?Java UrlHolder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UrlHolder类属于com.alibaba.dubbo.common.extensionloader.ext2包,在下文中一共展示了UrlHolder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test_urlHolder_getAdaptiveExtension
import com.alibaba.dubbo.common.extensionloader.ext2.UrlHolder; //导入依赖的package包/类
@Test
public void test_urlHolder_getAdaptiveExtension() throws Exception {
Ext2 ext = ExtensionLoader.getExtensionLoader(Ext2.class).getAdaptiveExtension();
Map<String, String> map = new HashMap<String, String>();
map.put("ext2", "impl1");
URL url = new URL("p1", "1.2.3.4", 1010, "path1", map);
UrlHolder holder = new UrlHolder();
holder.setUrl(url);
String echo = ext.echo(holder, "haha");
assertEquals("Ext2Impl1-echo", echo);
}
示例2: test_urlHolder_getAdaptiveExtension
import com.alibaba.dubbo.common.extensionloader.ext2.UrlHolder; //导入依赖的package包/类
@Test
public void test_urlHolder_getAdaptiveExtension() throws Exception {
Ext2 ext = ExtensionLoader.getExtensionLoader(Ext2.class).getAdaptiveExtension();
Map<String, String> map = new HashMap<String, String>();
map.put("ext2", "impl1");
URL url = new URL("p1", "1.2.3.4", 1010, "path1", map);
UrlHolder holder = new UrlHolder();
holder.setUrl(url);
String echo = ext.echo(holder, "haha");
assertEquals("Ext2Impl1-echo", echo);
}
示例3: echo
import com.alibaba.dubbo.common.extensionloader.ext2.UrlHolder; //导入依赖的package包/类
public String echo(UrlHolder holder, String s) {
return "Ext2Impl2-echo";
}
示例4: echo
import com.alibaba.dubbo.common.extensionloader.ext2.UrlHolder; //导入依赖的package包/类
public String echo(UrlHolder holder, String s) {
return "Ext2Impl3-echo";
}
示例5: echo
import com.alibaba.dubbo.common.extensionloader.ext2.UrlHolder; //导入依赖的package包/类
public String echo(UrlHolder holder, String s) {
return "Ext2Impl1-echo";
}