|
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 DirectoryProvider
java.lang.Exception
public java.lang.String currentDir() throws java.lang.Exception
currentDir
in interface DirectoryProvider
java.lang.Exception
public boolean reset() throws FTPSException
FTPOverSSLClient
reset
in interface FTPOverSSLClient
FTPSException
public void terminate() throws FTPSException
FTPOverSSLClient
terminate
in interface FTPOverSSLClient
FTPSException
public byte[] getPayload()
FTPOverSSLClient
getPayload
in interface FTPOverSSLClient
public void setPayload(byte[] newPayload)
FTPOverSSLClient
newPayload
setPayload
in interface FTPOverSSLClient
public void connect() throws FTPSException
FTPOverSSLClient
connect
in interface FTPOverSSLClient
FTPSException
public void disconnect() throws FTPSException
FTPOverSSLClient
disconnect
in interface FTPOverSSLClient
FTPSException
public boolean isConnected() throws FTPSException
FTPOverSSLClient
isConnected
in interface FTPOverSSLClient
FTPSException
public void PUT() throws FTPSException
PUT
in interface FTPOverSSLClient
FTPSException
public void put() throws FTPSException
put
in interface FTPOverSSLClient
FTPSException
public void doRawCommands(java.lang.String commands) throws FTPSException
doRawCommands
in interface FTPOverSSLClient
FTPSException
public void GET() throws FTPSException
GET
in interface FTPOverSSLClient
FTPSException
public void get() throws FTPSException
get
in interface FTPOverSSLClient
FTPSException
public void mkdir(java.lang.String dir) throws FTPSException
FTPOverSSLClient
dir
;
mkdir
in interface FTPOverSSLClient
FTPSException
public void mkdirs(java.lang.String dirs) throws FTPSException
FTPOverSSLClient
dirs
, dirs
can have more than one path components, which
can be relative or absolute;
mkdirs
in interface FTPOverSSLClient
FTPSException
public void deleteDir(java.lang.String dir) throws FTPSException
FTPOverSSLClient
dir
deleteDir
in interface FTPOverSSLClient
dir
- - the path to the directory to be deleted;
FTPSException
public void deleteFile(java.lang.String path) throws FTPSException
FTPOverSSLClient
path
deleteFile
in interface FTPOverSSLClient
path
- - 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 FTPOverSSLClient
path
-
FTPSException
public void listDir() throws FTPSException
FTPOverSSLClient
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;
listDir
in interface FTPOverSSLClient
FTPSException
public void listDirLong() throws FTPSException
FTPOverSSLClient
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;
listDirLong
in interface FTPOverSSLClient
FTPSException
public void append() throws FTPSException
append
in interface FTPOverSSLClient
FTPSException
public void upload() throws FTPSException
upload
in interface FTPOverSSLClient
FTPSException
public void download() throws FTPSException
download
in interface FTPOverSSLClient
FTPSException
public DirectoryEntry getEntry(int index) throws FTPSException
FTPOverSSLClient
listDir()
or listDirLong()
;
getEntry
in interface FTPOverSSLClient
FTPSException
public DirectoryEntry nextEntry() throws FTPSException
FTPOverSSLClient
nextEntry
in interface FTPOverSSLClient
FTPSException
public boolean hasEntry()
FTPOverSSLClient
hasEntry
in interface FTPOverSSLClient
public int getEntryCount()
FTPOverSSLClient
getEntryCount
in interface FTPOverSSLClient
public void resetEntries()
FTPOverSSLClient
nextEntry()
will return the first entry
in the list;
resetEntries
in interface FTPOverSSLClient
public java.lang.String getLastReply() throws FTPSException
FTPOverSSLClient
getLastReply
in interface FTPOverSSLClient
FTPSException
public java.lang.String getResolvedRemoteDirectory()
FTPOverSSLClient
getResolvedRemoteDirectory
in interface FTPOverSSLClient
public void setResolvedRemoteDirectory(java.lang.String s)
FTPOverSSLClient
setResolvedRemoteDirectory
in interface FTPOverSSLClient
s
- - the remote directory path;public java.lang.String getResolvedRemoteFile()
FTPOverSSLClient
getResolvedRemoteFile
in interface FTPOverSSLClient
public void setResolvedRemoteFile(java.lang.String s)
FTPOverSSLClient
setResolvedRemoteFile
in interface FTPOverSSLClient
s
- - the file name;public java.lang.String getResolvedLocalDirectory()
FTPOverSSLClient
getResolvedLocalDirectory
in interface FTPOverSSLClient
public void setResolvedLocalDirectory(java.lang.String s)
FTPOverSSLClient
setResolvedLocalDirectory
in interface FTPOverSSLClient
public java.lang.String getResolvedLocalFile()
FTPOverSSLClient
getResolvedLocalFile
in interface FTPOverSSLClient
public void setResolvedLocalFile(java.lang.String s)
FTPOverSSLClient
s
, should not be invoked directly from user collaboration;
setResolvedLocalFile
in interface FTPOverSSLClient
s
- - the file name to be set;public void resolveRemoteAsSource() throws FTPSException
resolveRemoteAsSource
in interface FTPOverSSLClient
FTPSException
public void resolveLocalAsSource() throws FTPSException
resolveLocalAsSource
in interface FTPOverSSLClient
FTPSException
public void resolveRemoteAsDestination() throws FTPSException
resolveRemoteAsDestination
in interface FTPOverSSLClient
FTPSException
public void resolveLocalAsDestination() throws FTPSException
resolveLocalAsDestination
in interface FTPOverSSLClient
FTPSException
public java.lang.String getLocalFileNameStub()
FTPOverSSLClient
getLocalFileNameStub
in interface FTPOverSSLClient
public void setLocalFileNameStub(java.lang.String s)
FTPOverSSLClient
setLocalFileNameStub
in interface FTPOverSSLClient
public java.lang.String getLocalDirNameStub()
FTPOverSSLClient
getLocalDirNameStub
in interface FTPOverSSLClient
public void setLocalDirNameStub(java.lang.String s)
FTPOverSSLClient
setLocalDirNameStub
in interface FTPOverSSLClient
public java.lang.String getRemoteFileNameStub()
FTPOverSSLClient
getRemoteFileNameStub
in interface FTPOverSSLClient
public void setRemoteFileNameStub(java.lang.String s)
FTPOverSSLClient
setRemoteFileNameStub
in interface FTPOverSSLClient
public java.lang.String getRemoteDirNameStub()
FTPOverSSLClient
getRemoteDirNameStub
in interface FTPOverSSLClient
public 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 |