public boolean isDisconnected() {
        return this == AUTHENTICATION_FAILED || this == DISCONNECTED;
    }
The states of a node connection

DISCONNECTED: connection has not been successfully established yet
CONNECTING: connection is under progress
CHECKING_API_VERSIONS: connection has been established and api versions check is in progress. Failure of this check will cause connection to close
READY: connection is ready to send requests
AUTHENTICATION_FAILED: connection failed due to an authentication error
clients/src/main/java/org/apache/kafka/clients/ConnectionState.java