<?xml version="1.0" encoding="UTF-8"?>
<!-- Each element under FtpClientCommandSet defines a meta-command consisting of one or more FTP commands.	-->
<!-- The FTP commands are executed in the specified order when Haboob runs the meta-command.  Each FTP command	-->
<!-- has a "class" attribute defining the class which implements the command.  (This can be user-defined.)	-->
<!-- Each command also has a "type" attribute of either "control" or "data" which reflects whether the class    -->
<!-- extends FtpCommand or FtpDataCommand, respectively.  FtpCommand classes only use the control connection	-->
<!-- for communication with the server.  FtpDataCommand classes use both the control and data connections.	-->
<!-- For more information, see the "FTP client scripting interface" document.					-->
<FtpClientCommandSet>
	<!-- meta-command for initial connection with server -->
	<connect>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Connect" type="control"/>
	</connect>
	<!-- meta-command for login sequence -->

	<authenticate>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Auth" type="control"/> 
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Pbsz" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Prot" type="control"/>      
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.User" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Pass" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Acct" type="control"/>

		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.UserCommands" type="control"/>

	</authenticate>

	<!-- meta-command for login sequence in explicit mode via DMZ with secure connection enabled -->
	<authenticateDMZ>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Prot" type="control"/>      
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.User" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Pass" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Acct" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.UserCommands" type="control"/>
	</authenticateDMZ>
 
	<!-- meta-command for sending a file to the server -->
	<send>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.MkdInbox" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.MkdPickup" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Type" type="control"/>
		<!-- The following 2 cmds have been removed because RFC959 specifies these settings as the default -->
		<!-- command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Stru" type="control"/ -->
		<!-- <command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Mode" type="control"/ -->
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Size" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.PortOrPasv" type="data"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Rest" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Stor" type="data"/>
		
		<!--- Pause (500ms) required here to avoid "file in use" bug in IIS's handling of large files. -->
		<!--- For very large files (e.g. 1GB) you would need to add potentially 100's of Pause -->
		<!--- commands here.  Instead it is highly recommended that the following patch from -->
		<!--- Microsoft be applied to the IIS server:  http://support.microsoft.com/?kbid=828086 -->
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Pause" type="control"/>

		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Dele" type="control"/>	
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Rnfr" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Rnto" type="control"/>
	</send>
	<!-- meta-command to get a list of files from the server -->
	<list>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.PortOrPasv" type="data"/>
		<!-- Use either the Nlst or List command here.  Nlst is preferable because it is compatible -->
		<!-- with the most servers, and it supports files with spaces in their names.  The only reason -->
		<!-- to switch to List is that it allows the trading engine to automatically ignore subdirectories -->
		<!-- if any happen to exist under the inbox or pickup directory. -->
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Nlst" type="data"/>
	</list>
	<!-- meta-command to list a file from the server -->
	<flist>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.PortOrPasv" type="data"/>
		<!-- Explicitly use List command because RFC 959 says the pathname argument can be a single file. -->
		<!-- Do not change this unless the server does not support the LIST command but does -->
		<!-- support the NLST command with a pathname argument specifying a single file. -->
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.List" type="data"/>
	</flist>
	<!-- meta-command to receive a file from the server -->
	<receive>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Type" type="control"/>
		<!-- The following 2 cmds have been removed because RFC959 specifies these settings as the default -->
		<!-- command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Stru" type="control"/ -->
		<!-- command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Mode" type="control"/ -->
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Size" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.MdTm" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.PortOrPasv" type="data"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Rest" type="control"/>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Retr" type="data"/>
	</receive>
	<!-- meta-command to delete a file on the server -->
	<delete>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Dele" type="control"/>
	</delete>
	<!-- meta-command to get the string representing the server's working directory -->
	<getworkingdir>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Pwd" type="control"/>
	</getworkingdir>
	<!-- meta-command to set the server's current working directory -->
	<setworkingdir>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Cwd" type="control"/>
	</setworkingdir>
	<getmodificationtime>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.MdTm" type="control"/>
	</getmodificationtime>
	<!-- meta-command to tell the server we are disconnecting -->
	<disconnect>
		<command class="com.cyclonecommerce.tradingengine.transport.ftp.commands.Quit" type="control"/>
	</disconnect>
</FtpClientCommandSet>
