default <T extends AppConn> T getAppConn(Class<T> appConnClass) {
        List<AppConn> appConns = listAppConns().stream().filter(appConnClass::isInstance).collect(Collectors.toList());
        if(appConns.isEmpty()) {
            throw new AppConnWarnException(25344, "Cannot find a AppConn instance for " + appConnClass.getSimpleName());
        } else if(appConns.size() > 1) {
            throw new AppConnWarnException(25344, "More than one AppConn instances is found, list: " + appConns);
        }
        return (T) appConns.get(0);
    }
Returns an appconn by its name
dss-appconn/dss-appconn-manager/dss-appconn-manager-core/src/main/java/com/webank/wedatasphere/dss/appconn/manager/AppConnManager.java