本文整理汇总了Java中com.alibaba.dubbo.remoting.transport.codec.CodecAdapter类的典型用法代码示例。如果您正苦于以下问题:Java CodecAdapter类的具体用法?Java CodecAdapter怎么用?Java CodecAdapter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CodecAdapter类属于com.alibaba.dubbo.remoting.transport.codec包,在下文中一共展示了CodecAdapter类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChannelCodec
import com.alibaba.dubbo.remoting.transport.codec.CodecAdapter; //导入依赖的package包/类
protected static Codec2 getChannelCodec(URL url) {
String codecName = url.getParameter(Constants.CODEC_KEY, "telnet");
if (ExtensionLoader.getExtensionLoader(Codec2.class).hasExtension(codecName)) {
return ExtensionLoader.getExtensionLoader(Codec2.class).getExtension(codecName);
} else {
return new CodecAdapter(ExtensionLoader.getExtensionLoader(Codec.class)
.getExtension(codecName));
}
}
示例2: getChannelCodec
import com.alibaba.dubbo.remoting.transport.codec.CodecAdapter; //导入依赖的package包/类
protected static Codec2 getChannelCodec(URL url) {
// codecName => dubbo
// dubbo=com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec
String codecName = url.getParameter(Constants.CODEC_KEY, "telnet");
if (ExtensionLoader.getExtensionLoader(Codec2.class).hasExtension(codecName)) {
return ExtensionLoader.getExtensionLoader(Codec2.class).getExtension(codecName);
} else {
return new CodecAdapter(ExtensionLoader.getExtensionLoader(Codec.class)
.getExtension(codecName));
}
}
示例3: getChannelCodec
import com.alibaba.dubbo.remoting.transport.codec.CodecAdapter; //导入依赖的package包/类
protected static Codec2 getChannelCodec(URL url) {
String codecName = url.getParameter(Constants.CODEC_KEY, "telnet");
if (ExtensionExtendUtil.hasExtension(Codec2.class, codecName)) {
return ExtensionExtendUtil.getExtension(Codec2.class, codecName);
} else {
return new CodecAdapter(ExtensionExtendUtil.getExtension(Codec.class, codecName));
}
}
示例4: getChannelCodec
import com.alibaba.dubbo.remoting.transport.codec.CodecAdapter; //导入依赖的package包/类
protected Codec2 getChannelCodec(URL url) {
String codecName = url.getParameter(Constants.CODEC_KEY, "telnet");
if (ExtensionLoader.getExtensionLoader(Codec2.class).hasExtension(codecName)) {
return ExtensionLoader.getExtensionLoader(Codec2.class).getExtension(codecName);
} else {
return new CodecAdapter(ExtensionLoader.getExtensionLoader(Codec.class)
.getExtension(codecName));
}
}
示例5: getChannelCodec
import com.alibaba.dubbo.remoting.transport.codec.CodecAdapter; //导入依赖的package包/类
protected static Codec2 getChannelCodec(URL url) {
String codecName = url.getParameter(Constants.CODEC_KEY, "telnet");
if (ExtensionLoader.getExtensionLoader(Codec2.class).hasExtension(codecName)) {
return ExtensionLoader.getExtensionLoader(Codec2.class).getExtension(codecName);
} else {
return new CodecAdapter(ExtensionLoader.getExtensionLoader(Codec.class)
.getExtension(codecName));
}
}