ZooKeeperSaslClient.java 文件源码

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

项目:zookeeper-src-learning 作者:
public void initialize(ClientCnxn cnxn) throws SaslException {
    if (saslClient == null) {
        saslState = SaslState.FAILED;
        throw new SaslException("saslClient failed to initialize properly: it's null.");
    }
    if (saslState == SaslState.INITIAL) {
        if (saslClient.hasInitialResponse()) {
            sendSaslPacket(cnxn);
        }
        else {
            byte[] emptyToken = new byte[0];
            sendSaslPacket(emptyToken, cnxn);
        }
        saslState = SaslState.INTERMEDIATE;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号