public static void registerProtocol(Protocol protocol, ProtocolCode protocolCode) {
        if (null == protocolCode || null == protocol) {
            throw new RuntimeException("Protocol: " + protocol + " and protocol code:"
                                       + protocolCode + " should not be null!");
        }
        Protocol exists = ProtocolManager.protocols.putIfAbsent(protocolCode, protocol);
        if (exists != null) {
            throw new RuntimeException("Protocol for code: " + protocolCode + " already exists!");
        }
    }
Manager of all protocols

@author tsui
@version $Id: ProtocolManager.java, v 0.1 2018-03-27 15:18 tsui Exp $
src/main/java/com/alipay/remoting/ProtocolManager.java