次のサンプルコードは、アダプタを動的に設定し、簡易ファイル転送を実行する方法を示しています。
BatchLocalFile から、ターゲットディレクトリ名を設定します。
//@map:Copy "InDir" to TargetDirectoryName BatchLocalFile_1.getConfiguration().setTargetDirectoryName( "InDir" ); |
BatchFTP から、アダプタを切断します。
//@map:Client.disconnect BatchFTP_1.getClient().disconnect(); |
ターゲットディレクトリ名を設定します。
//@map:Copy "OutDir" to TargetDirectoryName BatchFTP_1.getConfiguration().setTargetDirectoryName( "OutDir" ); |
ホスト名を設定します。
//@map:Copy "myftphostname" to HostName BatchFTP_1.getConfiguration().setHostName( "myftphostname" ); |
アダプタを接続します。
//@map:Client.connect BatchFTP_1.getClient().connect(); |
簡易ファイル転送
(ローカルファイルの取得) を実行します。
//@map: BatchLocalFile_1.getClient().get(); |
ペイロードを割り当てます。
//@map:Copy Payload to Payload BatchFTP_1.getClient().setPayload(BatchLocalFile_1.getClient().getPay load() ); |
ファイルを FTP サーバーに配置します。
//@map:Client.put BatchFTP_1.getClient().put(); |
コラボレーションエディタの Java ソースエディタを表示するには、コラボレーションエディタのツールバーにある「詳細モード」アイコンまたは「ソースコードモード」アイコンをクリックします。