CodecFactory.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:BJAF3.x 作者:
public static ChannelHandler createEncoder() {
    String f = AppProperties.get("rpc_common_codec", "java");
    if (f.equalsIgnoreCase("java")) {
        return new ObjectEncoder();
    } else if (f.equalsIgnoreCase("jbossSerialization")) {
        return new JBossSerializationEncoder();
    } else if (f.equalsIgnoreCase("json")) {
        throw new AppRuntimeException("not support " + f + " yet!");
    } else if (f.equalsIgnoreCase("hessian")) {
        return new HessianEncoder();
    } else {
        throw new AppRuntimeException("not support " + f + " yet!");
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号