Examples of Transfer


Examples of de.kout.wlFxp.ftp.Transfer

      index[i] = vfiles.size() - a[i];
    }
    for (int i = a.length - 1; i >= 0; i--) {
      int b = index[i];
      if (b > 1 && b <= vfiles.size()) {
        Transfer t = (Transfer) vfiles.elementAt(vfiles.size() - b);
        if (!transfering || b != vfiles.size()) {
          vfiles.removeElementAt(vfiles.size() - b);
          vfiles.insertElementAt(t, vfiles.size() - b + 2);
        }
        updateView();
View Full Code Here

Examples of de.kout.wlFxp.ftp.Transfer

      index[i] = vfiles.size() - a[i];
    }
    for (int i = 0; i < a.length; i++) {
      int b = index[i];
      if (b > -1 && b < vfiles.size()) {
        Transfer t = (Transfer) vfiles.elementAt(vfiles.size() - b);
        if (!transfering) {
          vfiles.removeElementAt(vfiles.size() - b);
          vfiles.insertElementAt(t, i);
        } else if (b < vfiles.size() - 1) {
          vfiles.removeElementAt(vfiles.size() - b);
View Full Code Here

Examples of de.kout.wlFxp.ftp.Transfer

      index[i] = vfiles.size() - a[i];
    }
    for (int i = a.length - 1; i >= 0; i--) {
      int b = index[i];
      if (b > 1 && b <= vfiles.size()) {
        Transfer t = (Transfer) vfiles.elementAt(vfiles.size() - b);
        if (!transfering || b != vfiles.size()) {
          vfiles.removeElementAt(vfiles.size() - b);
          vfiles.insertElementAt(t, vfiles.size());
        }
        updateView();
View Full Code Here

Examples of de.kout.wlFxp.ftp.Transfer

      // copy file to dir
      if (command.equals("cftd")) {
        wlPanel panel = (wlPanel) cmd.firstElement();
        cmd.removeElementAt(0);
        try {
          Transfer transfer = (Transfer) cmd.firstElement();
          cmd.removeElementAt(0);
          FtpFile file = transfer.getSource();
          FtpFile to = transfer.getDest();
          // if dir add files in dir to queue
          if (file.isDirectory()) {
            new File(to.getAbsolutePath()).mkdir();
            frame.getQueueList().removeFirst();
            frame.getQueueList().updateView();
            FtpFile[] files = file.list();
            for (int i = files.length - 1; i >= 0; i--) {
              FtpFile tmp = new FtpFile(files[i].getName());
              tmp.setFtpMode(false);
              tmp.setAbsolutePath(to.getAbsolutePath() + File.separator + files[i].getName());
              frame.getQueueList().addAtBegin(new Transfer(files[i], tmp, transfer.modeFrom, transfer.modeTo, transfer.from_to, null, null));
            }
          // copy the file
          } else {
            copyFileToDir(file, to, panel);
            frame.getQueueList().removeFirst();
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.Transfer

      ///////////////////////////////////////////////////////////////
      // Transfers
      if (context instanceof Transfer)
      {
        Transfer t = (Transfer) context;
        items.add(create(t.getGegenkontoName(),t.getGegenkontoNummer(),t.getGegenkontoBLZ()));
      }
      else if (context instanceof Transfer[])
      {
        Transfer[] list = (Transfer[]) context;
        for (int i=0;i<list.length;++i)
        {
          Transfer t = list[i];
          items.add(create(t.getGegenkontoName(),t.getGegenkontoNummer(),t.getGegenkontoBLZ()));
        }
      }
      ///////////////////////////////////////////////////////////////
      // Hibiscus-Adressen
      else if (context instanceof HibiscusAddress)
View Full Code Here

Examples of net.sf.czarrental.bl.payment.Transfer

    Reservation rezervace = new Reservation(zakaznik.getIDcus(), 20,
        new GregorianCalendar(2009, 12, 10).getTime(),
        new GregorianCalendar(2009, 12, 20).getTime(), "new", null,
        true);
    rezervace.save();
    Transfer transfer = new Transfer(rezervace.getIDres());
    transfer.save();
    Payment payment = new Payment(new GregorianCalendar(2009, 12, 10)
        .getTime(), null, transfer);
    payment.save();

    rezervace.setIDpay(payment.getIDpay());
View Full Code Here

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

Examples of net.sf.jftp.net.Transfer

                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

Examples of net.sf.jftp.net.Transfer

                    if(o == null)
                    {
                        return;
                    }

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

Examples of net.solosky.maplefetion.net.Transfer

   * @return
   */
  private Transfer buildTransfer(ArrayList<Port> portList)
  {
    TransferFactory factory = this.context.getTransferFactory();
    Transfer transfer = null;
    Port     port     = null;
    Iterator<Port> it = portList.iterator();
    while(it.hasNext()) {
      port = it.next();
      //尝试建立连接
      try {
        logger.trace("try to connect to port = "+port+" ..");
              transfer = factory.createTransfer(port);
            } catch (TransferException e) {
              logger.trace("Connect to port failed - Port = "+port, e);
            }
           
            //如果建立成功就跳出循环,否则继续尝试建立下一个端口的连接
      if(transfer!=null) {
        logger.trace("Transfer created success. - Transfer="+transfer.getTransferName());
        break;
      }
    }
    return transfer;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.