Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.mindbright.sshcommon
Class SSHFileTransferGUIThreadSwing

    java.lang.Object
      java.lang.Thread
          com.mindbright.sshcommon.SSHFileTransferGUIThreadSwing

All Implemented Interfaces:
  java.awt.event.ActionListener, java.util.EventListener, Progress, java.lang.Runnable, SSHFileTransferProgress

public final class SSHFileTransferGUIThreadSwing
extends java.lang.Thread
implements SSHFileTransferProgress, java.awt.event.ActionListener

Copies a bunch of files, optionally recursively, to or from the remote server while giving graphical feedback. This class is meant to be created from the GUI-thread. The actual file transfers will take place in a separate thread.

Field Summary

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Constructor Summary
`SSHFileTransferGUIThreadSwing(MindTermApp client, SSHFileTransfer fileXfer, java.lang.String[] localFileList, java.lang.String[] remoteFileList, boolean recursive, boolean background, boolean toRemote, SSHFileTransferDialogControl xferDialog)` Create the GUI and start copying the specified files.

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)`
`void` | `endDir()` Called when all files in a directory have been transferred
`void` | `endFile()` Called when a file has been successfully transferred
`void` | `progress(long size)` Called to report the current progress.
`void` | `run()`
`void` | `startDir(java.lang.String file)` Called when the transfer starts to transfer all files in a directory.
`void` | `startFile(java.lang.String file, long size)` Called when a file starts to transfer

Methods inherited from class java.lang.Thread
`activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SSHFileTransferGUIThreadSwing

    public SSHFileTransferGUIThreadSwing(MindTermApp client,
                                         SSHFileTransfer fileXfer,
                                         java.lang.String[] localFileList,
                                         java.lang.String[] remoteFileList,
                                         boolean recursive,
                                         boolean background,
                                         boolean toRemote,
                                         SSHFileTransferDialogControl xferDialog)
                                  throws java.lang.Exception

  Create the GUI and start copying the specified files.

Parameters:
  `client` - a connected SSH client which will be used for transport
  `fileXfer` - class resposible for transferring the files
  `localFileList` - List of local files
  `remoteFileList` - List of remote files
  `recursive` - true if the transfer should include the contents of directories.
  `background` - run in the background
  `toRemote` - true if the files should be copied from the local machine to the remote.
  `xferDialog` - dialog causing the file transfer

Method Detail

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### startFile

    public void startFile(java.lang.String file,
                          long size)

  Description copied from interface: `SSHFileTransferProgress`
  Called when a file starts to transfer

  Specified by:
    `startFile` in interface `SSHFileTransferProgress`
  Parameters:
    `file` - name of file to transfer
    `size` - file size

### startDir

    public void startDir(java.lang.String file)

  Description copied from interface: `SSHFileTransferProgress`
  Called when the transfer starts to transfer all files in a directory.

  Specified by:
    `startDir` in interface `SSHFileTransferProgress`
  Parameters:
    `file` - name of directory

### endFile

    public void endFile()

  Description copied from interface: `SSHFileTransferProgress`
  Called when a file has been successfully transferred

  Specified by:
    `endFile` in interface `SSHFileTransferProgress`

### endDir

    public void endDir()

  Description copied from interface: `SSHFileTransferProgress`
  Called when all files in a directory have been transferred

  Specified by:
    `endDir` in interface `SSHFileTransferProgress`

### progress

    public void progress(long size)

  Description copied from interface: `Progress`
  Called to report the current progress.

  Specified by:
    `progress` in interface `Progress`
  Parameters:
    `size` - the current progress. The range of possible values depends on the class reporting the progress.

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD