Examples of Transfer


Examples of ar.Transfer

  }
 
  public static final class DataEdgeBoost extends OptionTransfer<DataEdgeBoost.Controls> {
    @Override public Transfer<Number, Color> transfer(Controls p, Transfer subsequent) {
      Transfer t = new Seq(
          new Advise.DataEdgeBoost(p.radius()),
          new Numbers.Interpolate<>(p.lowColor(), p.highColor(), p.highColor()));
      if (subsequent == null) {
        return t;
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.Transfer

    }

    private void doItForJob(String jobId) throws InterruptedException {
        logger.info("Beginning download of "+jobId);
        String bucketName= getLast(on("/").omitEmptyStrings().split(awsLogUri));
        Transfer that=transferManager.downloadDirectory(bucketName, jobId, new File(localLogTarget));
        that.waitForCompletion();
    }
View Full Code Here

Examples of com.antimatterstudios.esftp.Transfer

    m_output.setText("<Testing SFTP Site>\nPlease Wait....\n");
    m_output.update();
   
    m_userInterface.updateStore();
    TransferDetails details = new TransferDetails(m_userInterface.getPreferences());
    Transfer transfer = Activator.getDefault().getTransfer(details.getProtocol());
    if(transfer != null){
      System.out.println("TI::test(), Transfer class = "+transfer.getClass().getName());
      transfer.init(details);
     
      try{
        System.out.println("TI::test(), calling test");
        m_userInterface.setVerified(transfer.test());
      }catch(NullPointerException e){
        System.out.println("NPE detected whilst testing and verifying the esftp details");
        System.out.println("TI::test(), NPE caught");
      }
      System.out.println("TI::test(), outputting everything");
      m_output.append( transfer.getTransferOuput() );
      System.out.println("TI::test(), test completed");
    }else System.out.println("transfer object was null");
  }
View Full Code Here

Examples of com.googlecode.richrest.client.Transfer

      public void actionPerformed(ActionEvent e) {
        if (getTransferModelSize() == 0) {
          JOptionPane.showMessageDialog(TransferPane.this, "没有任何传输项!", "中止", JOptionPane.WARNING_MESSAGE);
          return;
        }
        final Transfer execution = (Transfer)transportationList.getSelectedValue();
        if (execution == null) {
          JOptionPane.showMessageDialog(TransferPane.this, "请选择传输项!", "中止", JOptionPane.WARNING_MESSAGE);
          return;
        }
        if (! execution.isAbortable()) {
          JOptionPane.showMessageDialog(TransferPane.this, "此传输项不允许中止!", "中止", JOptionPane.WARNING_MESSAGE);
          return;
        }
        ThreadUtils.execute(new Runnable(){
          public void run() {
            try {
              execution.abort();
              JOptionPane.showMessageDialog(TransferPane.this, "中止传输项完成!", "中止", JOptionPane.INFORMATION_MESSAGE);
            } catch (Throwable t) {
              JOptionPane.showMessageDialog(TransferPane.this, "中止传输项失败! 原因: " + t.getMessage(), "中止", JOptionPane.WARNING_MESSAGE);
            }
          }
        });
      }
    });

    transportationList.getSelectionModel().addListSelectionListener(new ListSelectionListener(){

      public void valueChanged(ListSelectionEvent e) {
        final Transfer execution = (Transfer)transportationList.getSelectedValue();
        if (execution != null) {
          timeLabel.setText(new DecimalFormat("###,##0").format(System.currentTimeMillis() - execution.getTransferringTime().getTime()) + " ms");
        } else {
          timeLabel.setText("");
        }
        abortButton.setEnabled(execution != null && execution.isAbortable());
      }

    });

    final JButton resetButton = new JButton("刷新", Images.getIcon("refresh.gif"));
    resetButton.setToolTipText("刷新传输列表");
    toolBar.add(resetButton);
    resetButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        try {
          refreshTransferList();
          JOptionPane.showMessageDialog(TransferPane.this, "刷新传输列表成功!", "刷新", JOptionPane.INFORMATION_MESSAGE);
        } catch (Throwable t) {
          JOptionPane.showMessageDialog(TransferPane.this, "刷新传输列表失败! 原因: " + t.getMessage(), "刷新", JOptionPane.WARNING_MESSAGE);
        }
      }
    });
    transportationListener = new TransferDelegate(new TransferAdapter() {
      @Override
      public void onTransfer(TransferEvent event) {
        Transfer execution = event.getTransfer();
        if (! execution.isTransferred()) {
          synchronized (transportationModel) {
            if (! transportationModel.contains(execution))
              transportationModel.addElement(execution);
          }
        }
      }
      @Override
      public void onTransferred(TransferEvent event) {
        Transfer execution = event.getTransfer();
        synchronized (transportationModel) {
          transportationModel.removeElement(execution);
        }
      }
      @Override
View Full Code Here

Examples of com.googlecode.richrest.client.Transfer

    private static final long serialVersionUID = 1L;

    public Component getListCellRendererComponent(JList list, Object value,
        int index, boolean isSelected, boolean cellHasFocus) {
      super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
      Transfer execution = (Transfer)value;
      if (execution.isTransferring())
        this.setIcon(enableIcon);
      else
        this.setIcon(disableIcon);
      this.setText("" + (index + 1) + ". " + execution.toString());
      return this;
    }
View Full Code Here

Examples of com.googlecode.richrest.client.Transfer

        if (getTransportationModelSize() == 0) {
          MessageDialog.openWarning(parent.getShell(), "中止",
              "没有任何传输项!");
          return;
        }
        final Transfer execution = getSelectedExecution();
        if (execution == null) {
          MessageDialog.openWarning(parent.getShell(), "中止",
              "请选择传输项!");
          return;
        }
        if (!execution.isAbortable()) {
          MessageDialog.openWarning(parent.getShell(), "中止",
              "此传输项不允许中止!");
          return;
        }
        try {
          execution.abort();
          MessageDialog.openInformation(parent.getShell(), "中止",
              "中止传输项成功!");
        } catch (Throwable t) {
          MessageDialog.openWarning(parent.getShell(), "中止",
              "中止传输项失败! 原因: " + t.getMessage());
        }
      }
    });
    ToolItem refreshItem = new ToolItem(toolBar, SWT.NONE);
    refreshItem.setImage(Images.getImage("refresh.gif"));
    refreshItem.setText("刷新");
    refreshItem.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        refreshTransportationList(true);
      }
    });
    executionList = new List(this, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    executionList.setBounds(0, 40, 484, 384);
    Label statusLabel = new Label(this, SWT.NONE);
    statusLabel.setImage(Images.getImage("time.gif"));
    statusLabel.setBounds(0, 424, 20, 20);
    final Label timeLabel = new Label(this, SWT.NONE);
    timeLabel.setBounds(20, 428, 200, 20);
    executionList.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(SelectionEvent e) {
        final Transfer execution = getSelectedExecution();
        if (execution != null) {
          Display.getDefault().asyncExec(new Runnable() {
            public void run() {
              abortItem.setEnabled(execution.isAbortable());
              timeLabel.setText(new DecimalFormat("###,##0").format(System.currentTimeMillis() - execution.getTransferringTime().getTime()) + " ms");
            }
          });
        } else {
          Display.getDefault().asyncExec(new Runnable() {
            public void run() {
              abortItem.setEnabled(false);
              timeLabel.setText("");
            }
          });
        }
      }
      public void widgetDefaultSelected(SelectionEvent e) {
        widgetSelected(e);
      }
    });
    transportationListener = new TransferAdapter() {
      @Override
      public void onTransfer(TransferEvent event) {
        final Transfer execution = event.getTransfer();
        if (!execution.isTransferred()) {
          synchronized (executions) {
            if (! executions.contains(execution)) {
              executions.add(execution);
              final int i = executions.size();
              Display.getDefault().asyncExec(new Runnable() {
                public void run() {
                  executionList.add("(挂起) "
                      + i + ". "
                      + execution.toString());
                }
              });
            }
          }
        }
      }

      @Override
      public void onTransferred(TransferEvent event) {
        Transfer execution = event.getTransfer();
        synchronized (executions) {
          final int i = executions.indexOf(execution);
          if (i > -1 && i < executions.size()) {
            executions.remove(i);
            Display.getDefault().asyncExec(new Runnable() {
              public void run() {
                executionList.remove(i);
              }
            });
          }
        }
      }

      @Override
      public void onTransferring(final TransferEvent event) {
        final Transfer execution = event.getTransfer();
        synchronized (executions) {
          if (executions.contains(execution)) {
            final int i = executions.indexOf(execution);
            Display.getDefault().asyncExec(new Runnable() {
              public void run() {
                executionList.setItem(i, "(传输) " + (i + 1) + ". "
                    + execution.toString());
              }
            });
          }
        }
      }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.events.asm.Transfer

    /// <param name="sender">The sender</param>
    /// <param name="e">The EventArgs object containing the packet data</param>
    protected void TransferInfoHandler(Object sender, PacketReceivedEventArgs e)
    {
        TransferInfoPacket info = (TransferInfoPacket)e.getPacket();
        Transfer transfer;
        AssetDownload download;

        if ((transfer = Transfers.get(info.TransferInfo.TransferID))!=null)
        {
            download = (AssetDownload)transfer;
View Full Code Here

Examples of com.stripe.model.Transfer

    assertNull(Customer.retrieve(customer.getId()).getDiscount());
  }

  @Test
  public void testTransferCreate() throws StripeException {
    Transfer createdTransfer = Transfer.create(getTransferParams());
    assertEquals("pending", createdTransfer.getStatus());
  }
View Full Code Here

Examples of de.kout.wlFxp.ftp.Transfer

   *  Gets the element attribute of the QueueList object
   *
   *@return    The element value
   */
  public Transfer getElement() {
    Transfer t = (Transfer) vfiles.firstElement();
    return t;
  }
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 || b < vfiles.size() - 1) {
          vfiles.removeElementAt(vfiles.size() - b);
          vfiles.insertElementAt(t, vfiles.size() - b);
        }
        updateView();
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.