Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for Batch/FTP
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.ssl.ftp.client
Interface FTPOverSSLClient

All Superinterfaces:
  DirectoryProvider

All Known Implementing Classes:
  FTPOverSSLClientImpl

    public interface FTPOverSSLClient

extends DirectoryProvider

jim.fu@sun.com TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Method Summary
`void` | `append()` put local data to remote, and if the destination file already exists append the data at the end of the file;
`void` | `connect()` connect to the remote FTP server;
`void` | `deleteDir(java.lang.String dir)` delete a remote directory specified by `dir`
`void` | `deleteFile(java.lang.String path)` delete a remote file specified by `path`
`void` | `disconnect()` disconnect the client from the remote FTP server;
`void` | `doRawCommands(java.lang.String commands)`
`void` | `download()` download remote data (source) specified by configuration parameters `RemoteDirectory` and `RemoteFile` to local file (destination) specified by configuration parameters `LocalDirectory` and `LocalFile`, `LocalFile` is mandatory, i.e., data must be transferred into a local file, download() will not put data in payload;
`void` | `get()` get data from remote FTP server (specified by configuration parameters `RemoteDirectory` and `RemoteFile`) to the local machine; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters `LocalDirectory` and `LocalFile`, the remote data goes into payload when both `LocalDirectory` and `LocalFile` are left blank;
`void` | `GET()` get data from remote FTP server (specified by configuration parameters `RemoteDirectory` and `RemoteFile`) to the local machine; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters `LocalDirectory` and `LocalFile`, the remote data goes into payload when both `LocalDirectory` and `LocalFile` are left blank; if there are pre and post operations configured, they will be applied before and after the get operation respectively;
`DirectoryEntry` | `getEntry(int index)` get the index(th) entry in the current entry list Note, current entry list is populated by calling `listDir()` or `listDirLong()`;
`int` | `getEntryCount()` return the number of entries in the current entry list;
`java.lang.String` | `getLastReply()` get the FTP response code as String;
`java.lang.String` | `getLocalDirNameStub()` return the current name stub for local directory - when local directory name is a pattern this stub is used to substitute %f in a name pattern;
`java.lang.String` | `getLocalFileNameStub()` return the current name stub for local file - when local file name is a pattern this stub is used to substitute %f in a name pattern;
`byte[]` | `getPayload()` return the payload buffer - byte array;
`java.lang.String` | `getRemoteDirNameStub()` return the current name stub for remote directory - when remote directory name is a pattern this stub is used to substitute %f in a name pattern;
`java.lang.String` | `getRemoteFileNameStub()` return the current name stub for remote file - when remote file name is a pattern this stub is used to substitute %f in a name pattern;
`java.lang.String` | `getResolvedLocalDirectory()` Return the resolved local directory name;
`java.lang.String` | `getResolvedLocalFile()` Return the current resolved local file name;
`java.lang.String` | `getResolvedRemoteDirectory()` Return the current resolved remote directory name;
`java.lang.String` | `getResolvedRemoteFile()` Return the current resolved remote file name;
`boolean` | `hasEntry()` test if current entry list has entries;
`boolean` | `isConnected()` test if the client is connected to a remote FTP server;
`void` | `listDir()` list the entries under remote path specified by configuration parameters `RemoteDirectory` and `RemoteFile` only file name is available - use `listDirLong()` for time tamp and size information; use methods: hasEntry(), getEntry(index), nextEntry(), getEntryCount(), resetEntries() to access the entries;
`void` | `listDirLong()` list the entries under remote path specified by configuration parameters `RemoteDirectory` and `RemoteFile` file name, is directory flag and time stamp and size information is available - use `listDir()` for name only entries; use methods: hasEntry(), getEntry(index), nextEntry(), getEntryCount(), resetEntries() to access the entries;
`void` | `mkdir(java.lang.String dir)` create a remote directory as specified by parameter `dir`;
`void` | `mkdirs(java.lang.String dirs)` create remote directories as specified by parameter `dirs`, `dirs` can have more than one path components, which can be relative or absolute;
`DirectoryEntry` | `nextEntry()` return the next entry in the current entry list;
`void` | `put()` put data from local (specified by configuration parameters `LocalDirectory` and `LocalFile`) to the remote FTP server file specified by specified by configuration parameters `RemoteDirectory` and `RemoteFile`; depends on the current status of the configuration, the local data could be from payload (if parameters `LocalDirectory` and `LocalFile` are left blank) or a local file (if parameters `LocalDirectory` and `LocalFile` are specified);
`void` | `PUT()` put data from local (specified by configuration parameters `LocalDirectory` and `LocalFile`) to the remote FTP server file specified by specified by configuration parameters `RemoteDirectory` and `RemoteFile`; depends on the current status of the configuration, the local data could be from payload (if parameters `LocalDirectory` and `LocalFile` are left blank) or a local file (if parameters `LocalDirectory` and `LocalFile` are specified); if there are pre and post operations configured, they will be applied before and after the put operation respectively.
`void` | `renameFile(java.lang.String newName)` rename a remote file specified by configuration parameter `RemoteDirectory` and `RemoteFile` to a new name specified by parameter `newPath`;
`boolean` | `reset()` internal life cycle methods reset the ftp client such as discard payload buffer
`void` | `resetEntries()` reset the current entry list so that next call to `nextEntry()` will return the first entry in the list;
`void` | `resolveLocalAsDestination()` Resolve the local directory name and local file name if they are patterns (used to generate real directory and file name for data transfer destination), upon the success of the resolution, the current local directory name and/or local file name are real names that can be used for data transfer operations; before introduce a user configurable root name for replacing %f - use a fixed one REMOTE_DEST_DIR_STUB, REMOTE_DEST_FILE_STUB, LOCAL_DEST_DIR_STUB, LOCAL_DEST_FILE_STUB if the local dir or file is a pattern, then treat it as a name pattern (not regex - SeeBeyond propriatory patterns) such as %f, %M, %# etc.
`void` | `resolveLocalAsSource()` Resolve the local directory and file if they are regex (filters for data transfer source); upon the success of the resolution, the current local directory name and/or local file name are real names that can be used for data transfer operations; if the local dir or file is pattern, then treat them as regex (used to match existing entries from source), otherwise, use as literal;
`void` | `resolveRemoteAsDestination()` Resolve the remote directory name and remote file name if they are patterns (used to generate real directory and file name for data transfer destination), upon the success of the resolution, the current remote directory name and/or remote file name are real names that can be used for data transfer operations; before introduce a user configurable root name for replacing %f - use a fixed one REMOTE_DEST_DIR_STUB, REMOTE_DEST_FILE_STUB, LOCAL_DEST_DIR_STUB, LOCAL_DEST_FILE_STUB if the remote dir or file is a pattern, then treat it as a name pattern (not regex - SeeBeyond propriatory patterns) such as %f, %M, %# etc.
`void` | `resolveRemoteAsSource()` Resolve the remote directory and file if they are regex (filters for data transfer source); upon the success of the resolution, the current remote directory name and/or remote file name are real names that can be used for data transfer operations; if the remote dir or file is pattern, then treat them as regex (used to match existing entries from source), otherwise, use as literal;
`void` | `setLocalDirNameStub(java.lang.String s)` set the current name stub for local directory - when local directory name is a pattern this stub is used to substitute %f in a name pattern;
`void` | `setLocalFileNameStub(java.lang.String s)` set the current name stub for local file - when local file name is a pattern this stub is used to substitute %f in a name pattern;
`void` | `setPayload(byte[] newPayload)` set the payload buffer with `newPayload`
`void` | `setRemoteDirNameStub(java.lang.String s)` set the current name stub for remote directory - when remote directory name is a pattern this stub is used to substitute %f in a name pattern;
`void` | `setRemoteFileNameStub(java.lang.String s)` set the current name stub for remote file - when remote file name is a pattern this stub is used to substitute %f in a name pattern;
`void` | `setResolvedLocalDirectory(java.lang.String s)` Set the current resolved local directory name, should not be invoked directly from user collaboration;
`void` | `setResolvedLocalFile(java.lang.String s)` Set the current local file name to `s`, should not be invoked directly from user collaboration;
`void` | `setResolvedRemoteDirectory(java.lang.String s)` Set the current resolved remote directory name, should not be invoked directly from user collaboration;
`void` | `setResolvedRemoteFile(java.lang.String s)` Set the current resolved remote file name, should not be invoked directly from user collaboration;;
`void` | `terminate()` internal life cycle method;
`void` | `upload()` upload local data specified by configuration parameters `LocalDirectory` and `LocalFile` to remote destination file specified by configuration parameters `RemoteDirectory` and `RemoteFile`, `LocalFile` is mandatory, i.e., for upload(), data to be transferred must be from a local file, upload() does not take payload;

Methods inherited from interface com.stc.connector.batchadapter.directory.DirectoryProvider
`currentDir, listDir`

Method Detail

### reset

    boolean reset()
                  throws FTPSException

  internal life cycle methods reset the ftp client such as discard payload buffer

  Returns:
  Throws:
    `FTPSException`

### terminate

    void terminate()
                   throws FTPSException

  internal life cycle method;

  Throws:
    `FTPSException`

### getPayload

    byte[] getPayload()

  return the payload buffer - byte array;

  Returns:
    payload buffer;

### setPayload

    void setPayload(byte[] newPayload)

  set the payload buffer with `newPayload`

  Parameters:
    `newPayload` -

### connect

    void connect()
                 throws FTPSException

  connect to the remote FTP server;

  Throws:
    `FTPSException`

### disconnect

    void disconnect()
                    throws FTPSException

  disconnect the client from the remote FTP server;

  Throws:
    `FTPSException`

### isConnected

    boolean isConnected()
                        throws FTPSException

  test if the client is connected to a remote FTP server;

  Returns:
    true if connected false otherwise;
  Throws:
    `FTPSException`

### put

    void put()
             throws FTPSException

  put data from local (specified by configuration parameters `LocalDirectory` and `LocalFile`) to the remote FTP server file specified by specified by configuration parameters `RemoteDirectory` and `RemoteFile`; depends on the current status of the configuration, the local data could be from payload (if parameters `LocalDirectory` and `LocalFile` are left blank) or a local file (if parameters `LocalDirectory` and `LocalFile` are specified);

  Throws:
    `FTPSException`

### PUT

    void PUT()
             throws FTPSException

  put data from local (specified by configuration parameters `LocalDirectory` and `LocalFile`) to the remote FTP server file specified by specified by configuration parameters `RemoteDirectory` and `RemoteFile`; depends on the current status of the configuration, the local data could be from payload (if parameters `LocalDirectory` and `LocalFile` are left blank) or a local file (if parameters `LocalDirectory` and `LocalFile` are specified); if there are pre and post operations configured, they will be applied before and after the put operation respectively.

  Throws:
    `FTPSException`

### doRawCommands

    void doRawCommands(java.lang.String commands)
                       throws FTPSException

  Throws:
    `FTPSException`

### get

    void get()
             throws FTPSException

  get data from remote FTP server (specified by configuration parameters `RemoteDirectory` and `RemoteFile`) to the local machine; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters `LocalDirectory` and `LocalFile`, the remote data goes into payload when both `LocalDirectory` and `LocalFile` are left blank;

  Throws:
    `FTPSException`

### GET

    void GET()
             throws FTPSException

  get data from remote FTP server (specified by configuration parameters `RemoteDirectory` and `RemoteFile`) to the local machine; depends on the current status of the configuration, the remote data could be stored into the payload (in memory buffer) or a local file specified by configuration parameters `LocalDirectory` and `LocalFile`, the remote data goes into payload when both `LocalDirectory` and `LocalFile` are left blank; if there are pre and post operations configured, they will be applied before and after the get operation respectively;

  Throws:
    `FTPSException`

### mkdir

    void mkdir(java.lang.String dir)
               throws FTPSException

  create a remote directory as specified by parameter `dir`;

  Parameters:
    `dir` -
  Throws:
    `FTPSException`

### mkdirs

    void mkdirs(java.lang.String dirs)
                throws FTPSException

  create remote directories as specified by parameter `dirs`, `dirs` can have more than one path components, which can be relative or absolute;

  Parameters:
    `dirs` -
  Throws:
    `FTPSException`

### deleteDir

    void deleteDir(java.lang.String dir)
                   throws FTPSException

  delete a remote directory specified by `dir`

  Parameters:
    `dir` - - the path to the directory to be deleted;
  Throws:
    `FTPSException`

### deleteFile

    void deleteFile(java.lang.String path)
                    throws FTPSException

  delete a remote file specified by `path`

  Parameters:
    `path` - - the path to the file to be deleted;
  Throws:
    `FTPSException`

### renameFile

    void renameFile(java.lang.String newName)
                    throws FTPSException

  rename a remote file specified by configuration parameter `RemoteDirectory` and `RemoteFile` to a new name specified by parameter `newPath`;

  Parameters:
    `newName` - - new name to be renamed to;
  Throws:
    `FTPSException`

### listDir

    void listDir()
                 throws FTPSException

  list the entries under remote path specified by configuration parameters `RemoteDirectory` and `RemoteFile` only file name is available - use `listDirLong()` for time tamp and size information; use methods: hasEntry(), getEntry(index), nextEntry(), getEntryCount(), resetEntries() to access the entries;

  Throws:
    `FTPSException`

### listDirLong

    void listDirLong()
                     throws FTPSException

  list the entries under remote path specified by configuration parameters `RemoteDirectory` and `RemoteFile` file name, is directory flag and time stamp and size information is available - use `listDir()` for name only entries; use methods: hasEntry(), getEntry(index), nextEntry(), getEntryCount(), resetEntries() to access the entries;

  Throws:
    `FTPSException`

### append

    void append()
                throws FTPSException

  put local data to remote, and if the destination file already exists append the data at the end of the file;

  Throws:
    `FTPSException`

### upload

    void upload()
                throws FTPSException

  upload local data specified by configuration parameters `LocalDirectory` and `LocalFile` to remote destination file specified by configuration parameters `RemoteDirectory` and `RemoteFile`, `LocalFile` is mandatory, i.e., for upload(), data to be transferred must be from a local file, upload() does not take payload;

  Throws:
    `FTPSException`

### download

    void download()
                  throws FTPSException

  download remote data (source) specified by configuration parameters `RemoteDirectory` and `RemoteFile` to local file (destination) specified by configuration parameters `LocalDirectory` and `LocalFile`, `LocalFile` is mandatory, i.e., data must be transferred into a local file, download() will not put data in payload;

  Throws:
    `FTPSException`

### getLastReply

    java.lang.String getLastReply()
                                  throws FTPSException

  get the FTP response code as String;

  Returns:
    - response for last FTP command sent;
  Throws:
    `FTPSException`

### getEntry

    DirectoryEntry getEntry(int index)
                            throws FTPSException

  get the index(th) entry in the current entry list Note, current entry list is populated by calling `listDir()` or `listDirLong()`;

  Parameters:
    `index` -
  Returns:
    entry - the index(th) entry;
  Throws:
    `FTPSException`

### nextEntry

    DirectoryEntry nextEntry()
                             throws FTPSException

  return the next entry in the current entry list;

  Returns:
  Throws:
    `FTPSException`

### hasEntry

    boolean hasEntry()

  test if current entry list has entries;

  Returns:
    true - has entries false otherwise;

### getEntryCount

    int getEntryCount()

  return the number of entries in the current entry list;

  Returns:

### resetEntries

    void resetEntries()

  reset the current entry list so that next call to `nextEntry()` will return the first entry in the list;

### getResolvedRemoteDirectory

    java.lang.String getResolvedRemoteDirectory()

  Return the current resolved remote directory name;

  Returns:
    the resolved remote directory name

### setResolvedRemoteDirectory

    void setResolvedRemoteDirectory(java.lang.String s)

  Set the current resolved remote directory name, should not be invoked directly from user collaboration;

  Parameters:
    `s` - - the remote directory path;

### getResolvedRemoteFile

    java.lang.String getResolvedRemoteFile()

  Return the current resolved remote file name;

  Returns:
    the resolved name;

### setResolvedRemoteFile

    void setResolvedRemoteFile(java.lang.String s)

  Set the current resolved remote file name, should not be invoked directly from user collaboration;;

  Parameters:
    `s` - - the file name;

### getResolvedLocalDirectory

    java.lang.String getResolvedLocalDirectory()

  Return the resolved local directory name;

  Returns:
    the resolved name;

### setResolvedLocalDirectory

    void setResolvedLocalDirectory(java.lang.String s)

  Set the current resolved local directory name, should not be invoked directly from user collaboration;

  Parameters:
    `s` -

### getResolvedLocalFile

    java.lang.String getResolvedLocalFile()

  Return the current resolved local file name;

  Returns:
    the resolved name;

### setResolvedLocalFile

    void setResolvedLocalFile(java.lang.String s)

  Set the current local file name to `s`, should not be invoked directly from user collaboration;

  Parameters:
    `s` - - the file name to be set;

### resolveRemoteAsSource

    void resolveRemoteAsSource()
                               throws FTPSException

  Resolve the remote directory and file if they are regex (filters for data transfer source); upon the success of the resolution, the current remote directory name and/or remote file name are real names that can be used for data transfer operations; if the remote dir or file is pattern, then treat them as regex (used to match existing entries from source), otherwise, use as literal;

  Throws:
    `FTPSException`

### resolveLocalAsSource

    void resolveLocalAsSource()
                              throws FTPSException

  Resolve the local directory and file if they are regex (filters for data transfer source); upon the success of the resolution, the current local directory name and/or local file name are real names that can be used for data transfer operations; if the local dir or file is pattern, then treat them as regex (used to match existing entries from source), otherwise, use as literal;

  Throws:
    `FTPSException`

### resolveRemoteAsDestination

    void resolveRemoteAsDestination()
                                    throws FTPSException

  Resolve the remote directory name and remote file name if they are patterns (used to generate real directory and file name for data transfer destination), upon the success of the resolution, the current remote directory name and/or remote file name are real names that can be used for data transfer operations; before introduce a user configurable root name for replacing %f - use a fixed one REMOTE_DEST_DIR_STUB, REMOTE_DEST_FILE_STUB, LOCAL_DEST_DIR_STUB, LOCAL_DEST_FILE_STUB if the remote dir or file is a pattern, then treat it as a name pattern (not regex - SeeBeyond propriatory patterns) such as %f, %M, %# etc.

  Throws:
    `FTPSException`

### resolveLocalAsDestination

    void resolveLocalAsDestination()
                                   throws FTPSException

  Resolve the local directory name and local file name if they are patterns (used to generate real directory and file name for data transfer destination), upon the success of the resolution, the current local directory name and/or local file name are real names that can be used for data transfer operations; before introduce a user configurable root name for replacing %f - use a fixed one REMOTE_DEST_DIR_STUB, REMOTE_DEST_FILE_STUB, LOCAL_DEST_DIR_STUB, LOCAL_DEST_FILE_STUB if the local dir or file is a pattern, then treat it as a name pattern (not regex - SeeBeyond propriatory patterns) such as %f, %M, %# etc.

  Throws:
    `FTPSException`

### getLocalFileNameStub

    java.lang.String getLocalFileNameStub()

  return the current name stub for local file - when local file name is a pattern this stub is used to substitute %f in a name pattern;

  Returns:
    current name stub for local file;

### setLocalFileNameStub

    void setLocalFileNameStub(java.lang.String s)

  set the current name stub for local file - when local file name is a pattern this stub is used to substitute %f in a name pattern;

### getLocalDirNameStub

    java.lang.String getLocalDirNameStub()

  return the current name stub for local directory - when local directory name is a pattern this stub is used to substitute %f in a name pattern;

  Returns:
    current name stub for local directory;

### setLocalDirNameStub

    void setLocalDirNameStub(java.lang.String s)

  set the current name stub for local directory - when local directory name is a pattern this stub is used to substitute %f in a name pattern;

### getRemoteFileNameStub

    java.lang.String getRemoteFileNameStub()

  return the current name stub for remote file - when remote file name is a pattern this stub is used to substitute %f in a name pattern;

  Returns:
    current name stub for remote file;

### setRemoteFileNameStub

    void setRemoteFileNameStub(java.lang.String s)

  set the current name stub for remote file - when remote file name is a pattern this stub is used to substitute %f in a name pattern;

### getRemoteDirNameStub

    java.lang.String getRemoteDirNameStub()

  return the current name stub for remote directory - when remote directory name is a pattern this stub is used to substitute %f in a name pattern;

  Returns:
    current name stub for remote directory;

### setRemoteDirNameStub

    void setRemoteDirNameStub(java.lang.String s)

  set the current name stub for remote directory - when remote directory name is a pattern this stub is used to substitute %f in a name pattern;

Overview | Package | Class | Tree | Deprecated | Index | Help
| Sun Adapter for Batch/FTP
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD