|
Sun Adapter for Batch/FTP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FTPOverSSLClient
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 |
---|
boolean reset() throws FTPSException
FTPSException
void terminate() throws FTPSException
FTPSException
byte[] getPayload()
void setPayload(byte[] newPayload)
newPayload
newPayload
- void connect() throws FTPSException
FTPSException
void disconnect() throws FTPSException
FTPSException
boolean isConnected() throws FTPSException
FTPSException
void put() throws FTPSException
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);
FTPSException
void PUT() throws FTPSException
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.
FTPSException
void doRawCommands(java.lang.String commands) throws FTPSException
FTPSException
void get() throws FTPSException
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;
FTPSException
void GET() throws FTPSException
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;
FTPSException
void mkdir(java.lang.String dir) throws FTPSException
dir
;
dir
-
FTPSException
void mkdirs(java.lang.String dirs) throws FTPSException
dirs
, dirs
can have more than one path components, which
can be relative or absolute;
dirs
-
FTPSException
void deleteDir(java.lang.String dir) throws FTPSException
dir
dir
- - the path to the directory to be deleted;
FTPSException
void deleteFile(java.lang.String path) throws FTPSException
path
path
- - the path to the file to be deleted;
FTPSException
void renameFile(java.lang.String newName) throws FTPSException
RemoteDirectory
and RemoteFile
to a new name specified by parameter newPath
;
newName
- - new name to be renamed to;
FTPSException
void listDir() throws FTPSException
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;
FTPSException
void listDirLong() throws FTPSException
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;
FTPSException
void append() throws FTPSException
FTPSException
void upload() throws FTPSException
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;
FTPSException
void download() throws FTPSException
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;
FTPSException
java.lang.String getLastReply() throws FTPSException
FTPSException
DirectoryEntry getEntry(int index) throws FTPSException
listDir()
or listDirLong()
;
index
-
FTPSException
DirectoryEntry nextEntry() throws FTPSException
FTPSException
boolean hasEntry()
int getEntryCount()
void resetEntries()
nextEntry()
will return the first entry
in the list;
java.lang.String getResolvedRemoteDirectory()
void setResolvedRemoteDirectory(java.lang.String s)
s
- - the remote directory path;java.lang.String getResolvedRemoteFile()
void setResolvedRemoteFile(java.lang.String s)
s
- - the file name;java.lang.String getResolvedLocalDirectory()
void setResolvedLocalDirectory(java.lang.String s)
s
- java.lang.String getResolvedLocalFile()
void setResolvedLocalFile(java.lang.String s)
s
, should not be invoked directly from user collaboration;
s
- - the file name to be set;void resolveRemoteAsSource() throws FTPSException
FTPSException
void resolveLocalAsSource() throws FTPSException
FTPSException
void resolveRemoteAsDestination() throws FTPSException
FTPSException
void resolveLocalAsDestination() throws FTPSException
FTPSException
java.lang.String getLocalFileNameStub()
void setLocalFileNameStub(java.lang.String s)
java.lang.String getLocalDirNameStub()
void setLocalDirNameStub(java.lang.String s)
java.lang.String getRemoteFileNameStub()
void setRemoteFileNameStub(java.lang.String s)
java.lang.String getRemoteDirNameStub()
void setRemoteDirNameStub(java.lang.String s)
|
Sun Adapter for Batch/FTP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |