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.ssh
Class SSHRemoteFileBrowsingConsole

    java.lang.Object
      com.isnetworks.ssh.AbstractFileBrowser
          com.mindbright.ssh.SSHRemoteFileBrowsingConsole

All Implemented Interfaces:
  ExpectOutputStream.Expector, com.isnetworks.ssh.FileBrowser

public class SSHRemoteFileBrowsingConsole
extends com.isnetworks.ssh.AbstractFileBrowser
implements ExpectOutputStream.Expector

Field Summary

Fields inherited from class com.isnetworks.ssh.AbstractFileBrowser
`dirs, files, mFileDisplay`

Constructor Summary
`SSHRemoteFileBrowsingConsole(com.isnetworks.ssh.FileDisplayControl fileDisplay, java.lang.String remoteLSCommand, SSHConsoleRemote remote, java.lang.String cwd)`

Method Summary
`void` | `changeDirectory(java.lang.String directoryName)` Does a "cd" on the remote machine
`void` | `closed(ExpectOutputStream out, byte[] buf, int len)` This function is called when the data stream is closed.
`void` | `delete(com.isnetworks.ssh.FileListItem[] fileListItem)` Does a "rmdir" for directories in the array and a "rm" for files Will not delete non-empty directories
`void` | `disconnect()` Shut down the connection to the remote machine if it's active
`void` | `doCommand(java.lang.StringBuffer command)`
`void` | `fileDoubleClicked(com.isnetworks.ssh.FileListItem fileListItem)` User double clicked on a file in the list.
`void` | `initialize()` Kick up a new connection to the remote machine, killing the current one if it's still active
`void` | `makeDirectory(java.lang.String directoryName)` Executes a "mkdir" on the remote machine
`void` | `reached(ExpectOutputStream out, byte[] buf, int len)` This function is called whenever the expected string is found in the data stream.
`void` | `refresh()` Rather ugly way to get the current directory on the server and a list of files
`void` | `rename(com.isnetworks.ssh.FileListItem oldFile, java.lang.String newName)` Executes a "mv" on the remote machine

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

Constructor Detail

### SSHRemoteFileBrowsingConsole

    public SSHRemoteFileBrowsingConsole(com.isnetworks.ssh.FileDisplayControl fileDisplay,
                                        java.lang.String remoteLSCommand,
                                        SSHConsoleRemote remote,
                                        java.lang.String cwd)

Method Detail

### initialize

    public void initialize()
                    throws java.lang.Exception

  Kick up a new connection to the remote machine, killing the current one if it's still active

  Specified by:
    `initialize` in interface `com.isnetworks.ssh.FileBrowser`
  Throws:
    `java.lang.Exception`

### disconnect

    public void disconnect()

  Shut down the connection to the remote machine if it's active

  Specified by:
    `disconnect` in interface `com.isnetworks.ssh.FileBrowser`

### refresh

    public void refresh()
                 throws java.lang.Exception

  Rather ugly way to get the current directory on the server and a list of files

  Specified by:
    `refresh` in interface `com.isnetworks.ssh.FileBrowser`
  Throws:
    `java.lang.Exception`

### makeDirectory

    public void makeDirectory(java.lang.String directoryName)
                       throws java.lang.Exception

  Executes a "mkdir" on the remote machine

  Specified by:
    `makeDirectory` in interface `com.isnetworks.ssh.FileBrowser`
  Throws:
    `java.lang.Exception`

### rename

    public void rename(com.isnetworks.ssh.FileListItem oldFile,
                       java.lang.String newName)
                throws java.lang.Exception

  Executes a "mv" on the remote machine

  Specified by:
    `rename` in interface `com.isnetworks.ssh.FileBrowser`
  Throws:
    `java.lang.Exception`

### changeDirectory

    public void changeDirectory(java.lang.String directoryName)
                         throws java.lang.Exception

  Does a "cd" on the remote machine

  Specified by:
    `changeDirectory` in interface `com.isnetworks.ssh.FileBrowser`
  Throws:
    `java.lang.Exception`

### delete

    public void delete(com.isnetworks.ssh.FileListItem[] fileListItem)
                throws java.lang.Exception

  Does a "rmdir" for directories in the array and a "rm" for files Will not delete non-empty directories

  Specified by:
    `delete` in interface `com.isnetworks.ssh.FileBrowser`
  Throws:
    `java.lang.Exception`

### doCommand

    public void doCommand(java.lang.StringBuffer command)
                   throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### fileDoubleClicked

    public void fileDoubleClicked(com.isnetworks.ssh.FileListItem fileListItem)
                           throws java.lang.Exception

  User double clicked on a file in the list. Check if it's a directory and change to it if it is.

  Specified by:
    `fileDoubleClicked` in interface `com.isnetworks.ssh.FileBrowser`
  Throws:
    `java.lang.Exception`

### reached

    public void reached(ExpectOutputStream out,
                        byte[] buf,
                        int len)

  Description copied from interface: `ExpectOutputStream.Expector`
  This function is called whenever the expected string is found in the data stream.

  Specified by:
    `reached` in interface `ExpectOutputStream.Expector`
  Parameters:
    `out` - the stream this happened on.
    `buf` - a buffer containing all the data which has been seen on the stream since the last time `reached` was called. Note that the buffer may be bigger than needed.
    `len` - how many bytes of data there is in the buffer.

### closed

    public void closed(ExpectOutputStream out,
                       byte[] buf,
                       int len)

  Description copied from interface: `ExpectOutputStream.Expector`
  This function is called when the data stream is closed.

  Specified by:
    `closed` in interface `ExpectOutputStream.Expector`
  Parameters:
    `out` - the stream this happened on.
    `buf` - a buffer containing all the data which has been seen on the stream since the last time `reached` was called. Note that the buffer may be bigger than needed.
    `len` - how many bytes of data there is in the buffer.

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