Logo Search packages:      
Sourcecode: jftp version File versions  Download package

void net::sf::jftp::net::FtpConnection::fireProgressUpdate ( String  file,
String  type,
long  bytes 
) [inline]

Progress update. The transfer is active and makes progress, so a signal is send each few kb.

Parameters:
file The file transferred
type the type of event, DataConnection.GETDIR for example
bytes The number of bytes transferred so far

Definition at line 2981 of file FtpConnection.java.

References net::sf::jftp::net::ConnectionListener::updateProgress().

Referenced by download(), and upload().

    {
        //System.out.println(listener);
        if(listeners == null)
        {
            return;
        }
        else
        {
            for(int i = 0; i < listeners.size(); i++)
            {
                ConnectionListener listener = (ConnectionListener) listeners.elementAt(i);

                if(shortProgress && Settings.shortProgress)
                {
                    if(type.startsWith(DataConnection.DFINISHED))
                    {
                        listener.updateProgress(baseFile,
                                                DataConnection.DFINISHED + ":" +
                                                fileCount, bytes);
                    }
                    else if(isDirUpload)
                    {
                        listener.updateProgress(baseFile,
                                                DataConnection.PUTDIR + ":" +
                                                fileCount, bytes);
                    }
                    else
                    {
                        listener.updateProgress(baseFile,
                                                DataConnection.GETDIR + ":" +
                                                fileCount, bytes);
                    }
                }
                else
                {
                    listener.updateProgress(file, type, bytes);
                }
            }
        }
    }


Generated by  Doxygen 1.6.0   Back to index