public static ChannelBuilder clientChannelBuilder(
            SecurityProtocol securityProtocol,
            JaasContext.Type contextType,
            AbstractConfig config,
            ListenerName listenerName,
            String clientSaslMechanism,
            Time time,
            boolean saslHandshakeRequestEnable,
            LogContext logContext) {

        if (securityProtocol == SecurityProtocol.SASL_PLAINTEXT || securityProtocol == SecurityProtocol.SASL_SSL) {
            if (contextType == null)
                throw new IllegalArgumentException("`contextType` must be non-null if `securityProtocol` is `" + securityProtocol + "`");
            if (clientSaslMechanism == null)
                throw new IllegalArgumentException("`clientSaslMechanism` must be non-null in client mode if `securityProtocol` is `" + securityProtocol + "`");
        }
        return create(securityProtocol, ConnectionMode.CLIENT, contextType, config, listenerName, false, clientSaslMechanism,
                saslHandshakeRequestEnable, null, null, time, logContext, null);
    }
@param securityProtocol the securityProtocol
@param contextType the contextType, it must be non-null if `securityProtocol` is SASL_*; it is ignored otherwise
@param config client config
@param listenerName the listenerName if contextType is SERVER or null otherwise
@param clientSaslMechanism SASL mechanism if mode is CLIENT, ignored otherwise
@param time the time instance
@param saslHandshakeRequestEnable flag to enable Sasl handshake requests; disabled only for SASL
            inter-broker connections with inter-broker protocol version < 0.10
@param logContext the log context instance

@return the configured `ChannelBuilder`
@throws IllegalArgumentException if `mode` invariants described above is not maintained
clients/src/main/java/org/apache/kafka/common/network/ChannelBuilders.java