Dubbo Adpative

public class SimpleExt$Adpative implements com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt {
	
	public java.lang.String echo(com.alibaba.dubbo.common.URL arg0,java.lang.String arg1) {
		if (arg0 == null)
			throw new IllegalArgumentException("url == null");
		com.alibaba.dubbo.common.URL url = arg0;
		String extName = url.getParameter("simple.ext", "impl1");
		if (extName == null)
			throw new IllegalStateException(
					"Fail to get extension(com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt) name from url("
							+ url.toString() + ") use keys([simple.ext])");
		com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt extension = (com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt) ExtensionLoader
				.getExtensionLoader(
						com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt.class)
				.getExtension(extName);
		return extension.echo(arg0, arg1);
	}
	

	public java.lang.String yell(com.alibaba.dubbo.common.URL arg0,
			java.lang.String arg1) {
		if (arg0 == null)
			throw new IllegalArgumentException("url == null");
		com.alibaba.dubbo.common.URL url = arg0;
		String extName = url.getParameter("key1",
				url.getParameter("key2", "impl1"));
		if (extName == null)
			throw new IllegalStateException(
					"Fail to get extension(com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt) name from url("
							+ url.toString() + ") use keys([key1, key2])");
		com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt extension = (com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt) ExtensionLoader
				.getExtensionLoader(
						com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt.class)
				.getExtension(extName);
		return extension.yell(arg0, arg1);
	}

	public java.lang.String bang(com.alibaba.dubbo.common.URL arg0, int arg1) {
		throw new UnsupportedOperationException(
				"method public abstract java.lang.String com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt.bang(com.alibaba.dubbo.common.URL,int) of interface com.alibaba.dubbo.common.extensionloader.ext1.SimpleExt is not adaptive method!");
	}
}

 

你可能感兴趣的:(Dubbo Adpative)