use of org.apache.drill.exec.rpc.SaslCodec in project drill by apache.
the class ControlConnection method setSaslClient.
@Override
public void setSaslClient(final SaslClient saslClient) {
checkState(this.saslClient == null);
this.saslClient = saslClient;
// object. This is later used to do wrap/unwrap in handlers.
if (isEncryptionEnabled()) {
saslCodec = new SaslCodec() {
@Override
public byte[] wrap(byte[] data, int offset, int len) throws SaslException {
assert saslClient != null;
return saslClient.wrap(data, offset, len);
}
@Override
public byte[] unwrap(byte[] data, int offset, int len) throws SaslException {
assert saslClient != null;
return saslClient.unwrap(data, offset, len);
}
};
}
}
Aggregations