protected void negotiateDCAU(FTPClient src, FTPClient dst)
        throws IOException, FTPException {
        if (src instanceof GridFTPClient) {
            // src: dcau can be on or off
            if (dst instanceof GridFTPClient) {
                // dst: dca can be on or off
                GridFTPClient s = (GridFTPClient)src;
                GridFTPClient d = (GridFTPClient)dst;

                if (src.isFeatureSupported("DCAU") &&
                    dst.isFeatureSupported("DCAU")) {

                    setDCAU(s, getDCAU());
                    setDCAU(d, getDCAU());

                } else {
                    setDCAU(s, false);
                    setDCAU(d, false);
                    setDCAU(false);
                }

            } else {
                // dst: no dcau supported - disable src
                setDCAU((GridFTPClient)src, false);
                setDCAU(false);
            }
        } else {
            // src: no dcau
            if (dst instanceof GridFTPClient) {
                // dst: just disable dcau
                setDCAU((GridFTPClient)dst, false);
            } else {
                // dst: no dcau
                // we are all set then
            }
            setDCAU(false);
        }
    }
protected void negotiateDCAU ( FTPClient src , FTPClient dst ) throws IOException , FTPException { if ( src instanceof GridFTPClient ) { if ( dst instanceof GridFTPClient ) { GridFTPClient s = ( GridFTPClient ) src ; GridFTPClient d = ( GridFTPClient ) dst ; if ( src . isFeatureSupported ( "DCAU" ) && dst . isFeatureSupported ( "DCAU" ) ) { setDCAU ( s , getDCAU ( ) ) ; setDCAU ( d , getDCAU ( ) ) ; } else { setDCAU ( s , false ) ; setDCAU ( d , false ) ; setDCAU ( false ) ; } } else { setDCAU ( ( GridFTPClient ) src , false ) ; setDCAU ( false ) ; } } else { if ( dst instanceof GridFTPClient ) { setDCAU ( ( GridFTPClient ) dst , false ) ; } else { } setDCAU ( false ) ; } }
/*
This could replaced later with something more inteligent
where the user would set if dcau is required or not, etc.