|
Sun Adapter for Batch/FTP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.stc.connector.ssl.ftp.client.impl.FTPOverSSLClientImpl
public class FTPOverSSLClientImpl
jim.fu@sun.com TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
| Constructor Summary | |
|---|---|
FTPOverSSLClientImpl(FTPOverSSL intf,
java.util.Map aParams)
|
|
| Method Summary | |
|---|---|
void |
append()
need to handle pattern as dir and file name |
void |
connect()
connect to the remote FTP server; |
java.lang.String |
currentDir()
|
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()
need to handle pattern in dir and file name |
void |
get()
need to handle pattern as dir and file name; |
void |
GET()
get data from remote and apply pre and post operations if there are any configured; |
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; |
GenericDirectoryEntry[] |
listDir(java.lang.String path)
|
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; |
protected void |
logon()
|
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()
this is delegeted to a upload when local and remote are specified need to handle dir and file name as pattern |
void |
PUT()
put the data to the remote and apply pre and post operations if there is any configured; |
void |
renameFile(java.lang.String path)
when path is absolute, the source file represented by :
Remote Directory / Remote File will be moved to the destination file,
when it is relative, it is relative to the login home directory
if the destination directory does not exist, it is created. |
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()
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()
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()
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()
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()
need to handle pattern in dir and file name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FTPOverSSLClientImpl(FTPOverSSL intf,
java.util.Map aParams)
throws FTPSException
FTPSException| Method Detail |
|---|
protected void logon()
throws FTPSException
FTPSException
public GenericDirectoryEntry[] listDir(java.lang.String path)
throws java.lang.Exception
listDir in interface DirectoryProviderjava.lang.Exception
public java.lang.String currentDir()
throws java.lang.Exception
currentDir in interface DirectoryProviderjava.lang.Exception
public boolean reset()
throws FTPSException
FTPOverSSLClient
reset in interface FTPOverSSLClientFTPSException
public void terminate()
throws FTPSException
FTPOverSSLClient
terminate in interface FTPOverSSLClientFTPSExceptionpublic byte[] getPayload()
FTPOverSSLClient
getPayload in interface FTPOverSSLClientpublic void setPayload(byte[] newPayload)
FTPOverSSLClientnewPayload
setPayload in interface FTPOverSSLClient
public void connect()
throws FTPSException
FTPOverSSLClient
connect in interface FTPOverSSLClientFTPSException
public void disconnect()
throws FTPSException
FTPOverSSLClient
disconnect in interface FTPOverSSLClientFTPSException
public boolean isConnected()
throws FTPSException
FTPOverSSLClient
isConnected in interface FTPOverSSLClientFTPSException
public void PUT()
throws FTPSException
PUT in interface FTPOverSSLClientFTPSException
public void put()
throws FTPSException
put in interface FTPOverSSLClientFTPSException
public void doRawCommands(java.lang.String commands)
throws FTPSException
doRawCommands in interface FTPOverSSLClientFTPSException
public void GET()
throws FTPSException
GET in interface FTPOverSSLClientFTPSException
public void get()
throws FTPSException
get in interface FTPOverSSLClientFTPSException
public void mkdir(java.lang.String dir)
throws FTPSException
FTPOverSSLClientdir;
mkdir in interface FTPOverSSLClientFTPSException
public void mkdirs(java.lang.String dirs)
throws FTPSException
FTPOverSSLClientdirs, dirs
can have more than one path components, which
can be relative or absolute;
mkdirs in interface FTPOverSSLClientFTPSException
public void deleteDir(java.lang.String dir)
throws FTPSException
FTPOverSSLClientdir
deleteDir in interface FTPOverSSLClientdir - - the path to the directory to be deleted;
FTPSException
public void deleteFile(java.lang.String path)
throws FTPSException
FTPOverSSLClientpath
deleteFile in interface FTPOverSSLClientpath - - the path to the file to be deleted;
FTPSException
public void renameFile(java.lang.String path)
throws FTPSException
path is absolute, the source file represented by :
Remote Directory / Remote File will be moved to the destination file,
when it is relative, it is relative to the login home directory
if the destination directory does not exist, it is created.
renameFile in interface FTPOverSSLClientpath -
FTPSException
public void listDir()
throws FTPSException
FTPOverSSLClientRemoteDirectory 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;
listDir in interface FTPOverSSLClientFTPSException
public void listDirLong()
throws FTPSException
FTPOverSSLClientRemoteDirectory 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;
listDirLong in interface FTPOverSSLClientFTPSException
public void append()
throws FTPSException
append in interface FTPOverSSLClientFTPSException
public void upload()
throws FTPSException
upload in interface FTPOverSSLClientFTPSException
public void download()
throws FTPSException
download in interface FTPOverSSLClientFTPSException
public DirectoryEntry getEntry(int index)
throws FTPSException
FTPOverSSLClientlistDir() or listDirLong();
getEntry in interface FTPOverSSLClientFTPSException
public DirectoryEntry nextEntry()
throws FTPSException
FTPOverSSLClient
nextEntry in interface FTPOverSSLClientFTPSExceptionpublic boolean hasEntry()
FTPOverSSLClient
hasEntry in interface FTPOverSSLClientpublic int getEntryCount()
FTPOverSSLClient
getEntryCount in interface FTPOverSSLClientpublic void resetEntries()
FTPOverSSLClientnextEntry() will return the first entry
in the list;
resetEntries in interface FTPOverSSLClient
public java.lang.String getLastReply()
throws FTPSException
FTPOverSSLClient
getLastReply in interface FTPOverSSLClientFTPSExceptionpublic java.lang.String getResolvedRemoteDirectory()
FTPOverSSLClient
getResolvedRemoteDirectory in interface FTPOverSSLClientpublic void setResolvedRemoteDirectory(java.lang.String s)
FTPOverSSLClient
setResolvedRemoteDirectory in interface FTPOverSSLClients - - the remote directory path;public java.lang.String getResolvedRemoteFile()
FTPOverSSLClient
getResolvedRemoteFile in interface FTPOverSSLClientpublic void setResolvedRemoteFile(java.lang.String s)
FTPOverSSLClient
setResolvedRemoteFile in interface FTPOverSSLClients - - the file name;public java.lang.String getResolvedLocalDirectory()
FTPOverSSLClient
getResolvedLocalDirectory in interface FTPOverSSLClientpublic void setResolvedLocalDirectory(java.lang.String s)
FTPOverSSLClient
setResolvedLocalDirectory in interface FTPOverSSLClientpublic java.lang.String getResolvedLocalFile()
FTPOverSSLClient
getResolvedLocalFile in interface FTPOverSSLClientpublic void setResolvedLocalFile(java.lang.String s)
FTPOverSSLClients, should not be invoked directly from user collaboration;
setResolvedLocalFile in interface FTPOverSSLClients - - the file name to be set;
public void resolveRemoteAsSource()
throws FTPSException
resolveRemoteAsSource in interface FTPOverSSLClientFTPSException
public void resolveLocalAsSource()
throws FTPSException
resolveLocalAsSource in interface FTPOverSSLClientFTPSException
public void resolveRemoteAsDestination()
throws FTPSException
resolveRemoteAsDestination in interface FTPOverSSLClientFTPSException
public void resolveLocalAsDestination()
throws FTPSException
resolveLocalAsDestination in interface FTPOverSSLClientFTPSExceptionpublic java.lang.String getLocalFileNameStub()
FTPOverSSLClient
getLocalFileNameStub in interface FTPOverSSLClientpublic void setLocalFileNameStub(java.lang.String s)
FTPOverSSLClient
setLocalFileNameStub in interface FTPOverSSLClientpublic java.lang.String getLocalDirNameStub()
FTPOverSSLClient
getLocalDirNameStub in interface FTPOverSSLClientpublic void setLocalDirNameStub(java.lang.String s)
FTPOverSSLClient
setLocalDirNameStub in interface FTPOverSSLClientpublic java.lang.String getRemoteFileNameStub()
FTPOverSSLClient
getRemoteFileNameStub in interface FTPOverSSLClientpublic void setRemoteFileNameStub(java.lang.String s)
FTPOverSSLClient
setRemoteFileNameStub in interface FTPOverSSLClientpublic java.lang.String getRemoteDirNameStub()
FTPOverSSLClient
getRemoteDirNameStub in interface FTPOverSSLClientpublic void setRemoteDirNameStub(java.lang.String s)
FTPOverSSLClient
setRemoteDirNameStub in interface FTPOverSSLClient
|
Sun Adapter for Batch/FTP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||