|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.fc.Function
com.ibm.di.fc.filetransferfc.FileTransferFC
public class FileTransferFC
TDI File Transfer Function Component.
This function component (FC) provides the ability to transfer a specified file to a target machine.
This FC establishes connections and transfers file to target machines using the IBM Remote Execution and Access toolkit or existing FTPClient APIs (com.ibm.di.protocols.FTPClient). To use this function component you must have the File Transfer FC (with its included jar files) installed correctly on your local machine. The target machine you wish to connect and transfer file to must have at least one of the following connection protocols configured and running:
Configuration is accomplished by setting logon parameters for client
connections to the specified machine (target) where the file needs to be
transferred. See initialize(java.lang.Object)
for more details on how to initialize.
initialize(java.lang.Object)
must be the first operation called in this class.
perform(java.lang.Object)
can then be called one or more times.
terminate()
must be called to allow connection cleanup before the
class is destroyed.
Field Summary | |
---|---|
static String |
AS400_PROXY
The parameter for the Proxy to be used if required for AS400 connection |
static String |
AS400_SSL
The parameter for Enable or disable SSL over an AS400 connection |
com.ibm.di.fc.filetransferfc.FileTransferFC.Direction |
direction
Transfer Direction |
static String |
HANDLE_TEXT_FILE
The parameter to handle as Text file |
static String |
HOSTNAME
The property for the Hostname |
static String |
KEYSTORE
The property for the Keystore |
static String |
LOCAL_TO_LOCAL
String for Local to Local file transfer |
static String |
LOCAL_TO_REMOTE
String for Local to Remote file transfer |
protected LogProxy |
logProxy
The way to perform RXA connection related logging |
protected FileTransferOperator |
operator
The operator object that connects to the appropriate machine to transfer the file. |
protected String[] |
PARAM_CONFIG_OPTIONS
This array stores the names of the TDI GUI parameters that can be configured |
static String |
PARAM_CONFIG_RXA_LOG
Enable or disable RXA internal logging |
static String |
PARAM_CONFIG_SOURCE_HOST
The parameter for Source Hostname |
static String |
PARAM_CONFIG_SOURCE_PATH
The parameter for Source File Path |
static String |
PARAM_CONFIG_SOURCE_PORT
The parameter for Source Port |
static String |
PARAM_CONFIG_SOURCE_PROTOCOL
The parameter for Source Connection Protocol |
static String |
PARAM_CONFIG_TARGET_HOST
The parameter for Target Hostname |
static String |
PARAM_CONFIG_TARGET_PATH
The parameter for Target File Path |
static String |
PARAM_CONFIG_TARGET_PORT
The parameter for Target Port |
static String |
PARAM_CONFIG_TARGET_PROTOCOL
The parameter for Target Connection Protocol |
static String |
PASSPHRASE
The property for the Passphrase |
static String |
PASSWORD
The property for the Password |
static String |
PATH
The property for the path |
static String |
PORT
The property for the Port number |
static String |
PROTOCOL
The property key for connection protocol |
static String |
RECURSIVE_SEARCH
The property for Recursive search of the files |
static String |
REMOTE_TO_LOCAL
String for Remote to Local file transfer |
static String |
REMOTE_TO_REMOTE
String for Remote to Remote file transfer |
protected TDIRXALogAdapter |
RXAlogger
The way to perform RXA logging |
protected FileTransferOperator |
sourceOperator
The operator object that connects to source machine to transfer the file. |
static String |
SOURCEPATH
The property for the Source file path |
protected FileTransferOperator |
targetOperator
The operator object that connects to target machine to transfer the file. |
static String |
TIME_OUT
The parameter for file transfer operation timeout for RXA supported protocols |
static String |
USERNAME
The property key for the Username |
Fields inherited from class com.ibm.di.fc.Function |
---|
logger |
Constructor Summary | |
---|---|
FileTransferFC()
File Transfer FC constructor |
Method Summary | |
---|---|
void |
getFile()
Receives the file from Source to Local machine |
Vector<String> |
getProtocols(boolean isSource)
This function makes a list of protocols which can be used to make a successful connection to the specified machine with the specified connection parameters |
protected com.ibm.tivoli.remoteaccess.log.Logger |
getRXACompatableLogger()
Gets an RXA compatible logger |
String |
getVersion()
Gets the version of this FC. |
void |
initConnection()
Initializes connection to target machine(s) |
void |
initialize(Object o)
This function is called once after the components configuration file has been provided by the caller. |
String[] |
listSource()
Retrieves the list of Files in the Source path |
String[] |
listTarget()
Retrieves the list of Files in the Target path |
Object |
perform(Object arg0)
The FC receives the information about connection parameters from configuration panel or from its Output Map and transfers a file from given Source to Target |
void |
printDebugMessage(String msgKey,
Object[] params)
Prints a debug message if debug mode for the Components is enabled. |
void |
putFile()
Send the file from Local to Target machine |
void |
terminate()
This function is called when the connector is no longer needed by the user in the Assembly Line or script. |
Methods inherited from class com.ibm.di.fc.Function |
---|
debug, getConfiguration, getContext, getDebug, getLog, getParam, getRSInterface, getUI, initialize, logmsg, querySchema, setConfiguration, setContext, setDebug, setLog, setParam, setRSInterface, updateSchema, verifyInitialized |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PARAM_CONFIG_SOURCE_PROTOCOL
public static final String PARAM_CONFIG_SOURCE_PATH
public static final String PARAM_CONFIG_SOURCE_HOST
public static final String PARAM_CONFIG_SOURCE_PORT
public static final String PARAM_CONFIG_TARGET_PROTOCOL
public static final String PARAM_CONFIG_TARGET_PATH
public static final String PARAM_CONFIG_TARGET_HOST
public static final String PARAM_CONFIG_TARGET_PORT
public static final String PROTOCOL
public static final String USERNAME
public static final String PASSWORD
public static final String KEYSTORE
public static final String PASSPHRASE
public static final String HOSTNAME
public static final String PORT
public static final String PATH
public static final String SOURCEPATH
public static final String RECURSIVE_SEARCH
public static final String TIME_OUT
public static final String HANDLE_TEXT_FILE
public static final String AS400_SSL
public static final String AS400_PROXY
protected final String[] PARAM_CONFIG_OPTIONS
protected FileTransferOperator operator
protected FileTransferOperator sourceOperator
protected FileTransferOperator targetOperator
public static final String LOCAL_TO_LOCAL
public static final String LOCAL_TO_REMOTE
public static final String REMOTE_TO_LOCAL
public static final String REMOTE_TO_REMOTE
public com.ibm.di.fc.filetransferfc.FileTransferFC.Direction direction
protected LogProxy logProxy
protected TDIRXALogAdapter RXAlogger
public static final String PARAM_CONFIG_RXA_LOG
Constructor Detail |
---|
public FileTransferFC()
Method Detail |
---|
public Object perform(Object arg0) throws Exception
arg0
- the work entry passed to the FC.
Exception
- if a problem occurs.public void initialize(Object o) throws Exception
initialize
in interface FunctionInterface
initialize
in class Function
o
- The custom log object from TDI.
Exception
- If super class initialize fails.protected com.ibm.tivoli.remoteaccess.log.Logger getRXACompatableLogger()
public void initConnection() throws RemoteConnectException, ParamException, Exception
Exception
ParamException
RemoteConnectException
public String getVersion()
public void printDebugMessage(String msgKey, Object[] params)
msgKey
- message keyparams
- place holder for debug messagespublic void terminate() throws Exception
terminate
in interface FunctionInterface
terminate
in class Function
Exception
public Vector<String> getProtocols(boolean isSource)
isSource
- Checks if protocols need to be retrieved for Source end point
public void getFile() throws RemoteConnectException, ParamException, Exception
Exception
ParamException
RemoteConnectException
public void putFile() throws RemoteConnectException, ParamException, Exception
Exception
ParamException
RemoteConnectException
public String[] listSource() throws RemoteConnectException, ParamException, Exception
Exception
ParamException
RemoteConnectException
public String[] listTarget() throws RemoteConnectException, ParamException, Exception
Exception
ParamException
RemoteConnectException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |