Package net.sf.jftp.net

Examples of net.sf.jftp.net.Transfer


            {
                cmd = getFile(cmd);

                try
                {
                    Transfer d = (Transfer) JFtp.getConnectionHandler()
                                                .getConnections().get(cmd);

                    if(d == null)
                    {
                        return;
                    }

                    d.work = false;
                    d.pause = false;
                }
                catch(Exception ex)
                {
                    ex.printStackTrace();
                }
            }
            else
            {
                cmd = getFile(cmd);

                ConnectionHandler h = JFtp.getConnectionHandler();

                //Enumeration e =h.getConnections().keys();
                //while(e.hasMoreElements()) Log.out("available transfer: " + (String) e.nextElement());
                Object o = h.getConnections().get(cmd);

                Log.out("aborting  transfer: " + cmd);
                Log.out("connection handler present: " + h + ", pool size: " +
                        h.getConnections().size());

                if(o instanceof HttpTransfer)
                {
                    Transfer d = (Transfer) o;
                    d.work = false;
                    updateList(cmd, DataConnection.FAILED, -1, -1);

                    return;
                }
                else
                {
                    Transfer d = (Transfer) o;

                    DataConnection con = d.getDataConnection();
                    con.getCon().work = false;

                    try
                    {
                        con.sock.close();
View Full Code Here


                if(o == null)
                {
                    return;
                }

                Transfer d = (Transfer) o;
                d.pause = true;

                DataConnection con = d.getDataConnection();

                try
                {
                    con.sock.close();
                }
                catch(Exception ex)
                {
                    ex.printStackTrace();
                }

                d.prepare();
            }
        }
        catch(Exception ex)
        {
            Log.debug("Action is not supported for this connection.");
View Full Code Here

                    if(o == null)
                    {
                        return;
                    }

                    Transfer d = (Transfer) o;
                    d.work = true;
                    d.pause = false;
                }
                catch(Exception ex)
                {
View Full Code Here

TOP

Related Classes of net.sf.jftp.net.Transfer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.