|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.fc.filetransferfc.FileTransferOperator
public class FileTransferOperator
The File Transfer Operator that connects and Transfer Files to a target machine
Constructor Summary | |
---|---|
FileTransferOperator(java.util.Properties p,
Log log)
Constructor for the FileTransferAgent |
Method Summary | |
---|---|
void |
close()
Closes the connection to the target |
void |
createDirectory(java.lang.String dir)
Create a directory on the target machine |
java.util.Vector<java.lang.String> |
getProtocolList()
Iterates through all the protocols and tries to make a connection using each of them with the specified configuration |
boolean |
isExists(java.lang.String filePath)
Checks the given file exists or not on remote machine |
java.lang.String[] |
list(java.lang.String path)
Checks the given file exists or not on remote machine |
boolean |
prepareConnection()
Creates a connection with the target machine |
void |
printDebugMessage(java.lang.String msgKey,
java.lang.Object[] params)
Prints a debug message if debug mode for the Components is enabled. |
void |
receiveFile(java.lang.String source,
java.lang.String target)
Receives a file from target to source |
void |
transferFile(java.lang.String source,
java.lang.String target)
Transfers file from source to target |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTransferOperator(java.util.Properties p, Log log)
lp
- The LogProxy for loggingp
- The configuration properties for the initialization of the
connectionMethod Detail |
---|
public boolean prepareConnection() throws RemoteConnectException, ParamException, java.lang.Exception
RemoteConnectException
ParamException
java.lang.Exception
public void transferFile(java.lang.String source, java.lang.String target) throws java.lang.Exception
source
- Path to source filetarget
- Path to destination file on target machine
java.lang.Exception
- If file transfer is unsuccessfulpublic void receiveFile(java.lang.String source, java.lang.String target) throws java.lang.Exception
source
- Path to source filetarget
- Path to destination file on local machine
java.lang.Exception
- If file transfer is unsuccessfulpublic void createDirectory(java.lang.String dir) throws java.lang.Exception
dir
- Path of the folder to be created
java.lang.Exception
- If the directory creation is not successful.public boolean isExists(java.lang.String filePath) throws java.lang.Exception
filePath
- Path of the file
java.lang.Exception
public java.lang.String[] list(java.lang.String path) throws java.lang.Exception
path
- Path of the file
java.lang.Exception
public void close()
public java.util.Vector<java.lang.String> getProtocolList()
public void printDebugMessage(java.lang.String msgKey, java.lang.Object[] params)
msgKey
- message keyparams
- place holder for debug messages
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |