在WMQ-FTE中成功转移后,是否可以传输文件列表?

时间:2012-06-05 06:17:41

标签: ibm-mq file-transfer websphere-mq-fte

我希望在使用WMQ-FTE传输它们之后将一些文件移动到带时间戳的目录。我正在运行v7.0.4.1。

我的问题是总是有新文件写入我要转出的目录,所以只是盲目地转移所有内容不是这样的。我还批量传输触发器,因为它们以大约1000个批量发生,因此每1000个文件只传输一次。

我希望会有一些元数据包含传输文件的路径列表,因此我可以在传输发生之前或之后将它们移动到目录。目录创建将是前置或后置源调用的一部分。

1 个答案:

答案 0 :(得分:0)

看看DestinationTransferEndExit.java API documentation。特别是,请查看fileResults参数。 ANT任务可以使用此参数对特定文件执行操作。

/**
 * Invoked immediately after the completion of a transfer on the agent acting as
 * the destination of the transfer.
 * 
 * @param transferExitResult
 *            a result object reflecting whether or not the transfer completed
 *            successfully.
 * 
 * @param sourceAgentName
 *            the name of the agent acting as the source of the transfer.
 * 
 * @param destinationAgentName
 *            the name of the agent acting as the destination of the
 *            transfer.  This is the name of the agent that the 
 *            implementation of this method will be invoked from.
 * 
 * @param environmentMetaData
 *            meta data about the environment in which the implementation
 *            of this method is running.  This information can only be read,
 *            it cannot be updated by the implementation.  The constants
 *            defined in <code>EnvironmentMetaDataConstants</code> class can 
 *            be used to access the data held by this map.
 * 
 * @param transferMetaData
 *            meta data to associate with the transfer.  The information can
 *            only be read, it cannot be updated by the implementation.  This 
 *            map may also contain keys with IBM reserved names.  These 
 *            entries are defined in the <code>TransferMetaDataConstants</code> 
 *            class and have special semantics.
 * 
 * @param fileResults
 *            a list of file transfer result objects that describe the source
 *            file name, destination file name and result of each file transfer
 *            operation attempted.
 * 
 * @return    an optional description to enter into the log message describing
 *            transfer completion.  A value of <code>null</code> can be used
 *            when no description is required.
 */
String onDestinationTransferEnd(TransferExitResult transferExitResult,
                String sourceAgentName,
                String destinationAgentName,
                Map<String, String>environmentMetaData,
                Map<String, String>transferMetaData, 
                List<FileTransferResult>fileResults);
相关问题