java类org.apache.zookeeper.ClientCnxn的实例源码

ZooKeeperSaslClient.java 文件源码 项目:fuck_zookeeper 阅读 34 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:fuck_zookeeper 阅读 40 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:fuck_zookeeper 阅读 29 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:https-github.com-apache-zookeeper 阅读 29 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:https-github.com-apache-zookeeper 阅读 36 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:https-github.com-apache-zookeeper 阅读 29 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:ZooKeeper 阅读 32 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:ZooKeeper 阅读 45 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:ZooKeeper 阅读 31 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:StreamProcessingInfrastructure 阅读 37 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:StreamProcessingInfrastructure 阅读 35 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:StreamProcessingInfrastructure 阅读 33 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:bigstreams 阅读 35 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:bigstreams 阅读 39 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:bigstreams 阅读 34 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:zookeeper-src-learning 阅读 37 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:zookeeper-src-learning 阅读 33 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:zookeeper-src-learning 阅读 30 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:zookeeper 阅读 28 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:zookeeper 阅读 29 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:zookeeper 阅读 26 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:SecureKeeper 阅读 38 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:SecureKeeper 阅读 44 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:SecureKeeper 阅读 36 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:SecureKeeper 阅读 31 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:SecureKeeper 阅读 36 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:SecureKeeper 阅读 38 收藏 0 点赞 0 评论 0
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;
    }
}
ZooKeeperSaslClient.java 文件源码 项目:StreamBench 阅读 38 收藏 0 点赞 0 评论 0
public void processResult(int rc, String path, Object ctx, byte data[], Stat stat) {
    // processResult() is used by ClientCnxn's sendThread to respond to
    // data[] contains the Zookeeper Server's SASL token.
    // ctx is the ZooKeeperSaslClient object. We use this object's respondToServer() method
    // to reply to the Zookeeper Server's SASL token
    ZooKeeperSaslClient client = ((ClientCnxn)ctx).zooKeeperSaslClient;
    if (client == null) {
        LOG.warn("sasl client was unexpectedly null: cannot respond to Zookeeper server.");
        return;
    }
    byte[] usedata = data;
    if (data != null) {
        LOG.debug("ServerSaslResponseCallback(): saslToken server response: (length="+usedata.length+")");
    }
    else {
        usedata = new byte[0];
        LOG.debug("ServerSaslResponseCallback(): using empty data[] as server response (length="+usedata.length+")");
    }
    client.respondToServer(usedata, (ClientCnxn)ctx);
}
ZooKeeperSaslClient.java 文件源码 项目:StreamBench 阅读 33 收藏 0 点赞 0 评论 0
private void sendSaslPacket(byte[] saslToken, ClientCnxn cnxn)
  throws SaslException{
    if (LOG.isDebugEnabled()) {
        LOG.debug("ClientCnxn:sendSaslPacket:length="+saslToken.length);
    }

    GetSASLRequest request = new GetSASLRequest();
    request.setToken(saslToken);
    SetSASLResponse response = new SetSASLResponse();
    ServerSaslResponseCallback cb = new ServerSaslResponseCallback();

    try {
        cnxn.sendPacket(request,response,cb, ZooDefs.OpCode.sasl);
    } catch (IOException e) {
        throw new SaslException("Failed to send SASL packet to server.",
            e);
    }
}
ZooKeeperSaslClient.java 文件源码 项目:StreamBench 阅读 30 收藏 0 点赞 0 评论 0
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;
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号