Click or drag to resize

FileTransferRequest Class

** NOTE: ADDED in CFX 1.4 **

Sent by an endpoint to another endpoint to initiate a file transfer. File transfers may proceed either from the initiator/requester to the recipient (PUSH Mode), OR from recipient to initiator/requester (PULL Mode). File transfers may also be "In-Band", meaning that the file data payload is included in the CFX message directly and transferred via the AMQP protocol. OR, they may be "Out-of-Band", meaning that a secure link to the data file is passed via the CFX message over AMQP protocol, and a secondary protocol (such as HTTPS or SFTP) is then used to transfer the file data payload, independent of the AMQP message stream. When in PUSH mode, the FileTransferRequest will either contain the In-Band file data payload, or an Out-Of-Band secure link. When in PULL mode, the FileTransferResponse will contain the In-Band file data payload, or an Out-Of-Band secure link.

In-Band file transfers should only be used for small data files. Many AMQP message broker platforms limit the maximum total message size of an AMQP message. Microsoft's Azure message bus, for example, limits messages to 256KB for a standard subscription, and 1MB for a premium subscription. RabbitMQ recommends limiting messages to 128MB or less. Use OutOfBand transfer for larger file sizes.

Out-of-Band PULL Example:

{
  "FileTitle": "IPC_2581_DPMX_DesignData_Example1.xml",
  "FileLocation": "\\DesignDataRoot\\Folder1",
  "TransferDirection": "Pull",
  "TransferMode": "OutOfBand",
  "File": null
}
{
  "Result": {
    "Result": "Success",
    "ResultCode": 0,
    "Message": "OK"
  },
  "FileTitle": "IPC_2581_DPMX_DesignData_Example1.xml",
  "FileLocation": "\\DesignDataRoot\\Folder1",
  "TransferMode": "OutOfBand",
  "File": {
    "FileType": "DPMX",
    "MimeType": null,
    "FileData": null,
    "FileURL": "https://jsmith:Pa$$w0rd@designserver1.mydomain.com"
  }
}

Out-of-Band PUSH Example:

{
  "FileTitle": "IPC_2581_DPMX_DesignData_Example1.xml",
  "FileLocation": "\\DesignDataRoot\\Folder1",
  "TransferDirection": "Push",
  "TransferMode": "OutOfBand",
  "File": {
    "FileType": "DPMX",
    "MimeType": null,
    "FileData": null,
    "FileURL": "https://jsmith:Pa$$w0rd@designserver1.mydomain.com"
  }
}
{
  "Result": {
    "Result": "Success",
    "ResultCode": 0,
    "Message": "OK"
  },
  "FileTitle": "IPC_2581_DPMX_DesignData_Example1.xml",
  "FileLocation": "\\DesignDataRoot\\Folder1",
  "TransferMode": "OutOfBand",
  "File": null
}
Inheritance Hierarchy
SystemObject
  CFXCFXMessage
    CFX.InformationSystem.DataTransferFileTransferRequest

Namespace: CFX.InformationSystem.DataTransfer
Assembly: CFX (in CFX.dll) Version: 1.7.3
Syntax
public class FileTransferRequest : CFXMessage

The FileTransferRequest type exposes the following members.

Constructors
 NameDescription
Public methodFileTransferRequest Default constructor
Top
Properties
 NameDescription
Public propertyFile For file transfers initiated at the source (FileTransferDirection.Push), contains information about the file to be transferred. For file transfers initiated by the destination (FileTransferDirection.Pull), this property should be NULL. For FileTransferMode.InBand, this structure will contain the file payload (data) itself. For FileTransferMode.OutOfBand, this structure will contain a secure link/URL that can be used by the destination to obtain the file payload data.
Public propertyFileLocation An optional property that may be used to indicate the location to the file on the source system. This need not be a physical path. It could be as virtual path, as in the case of a web or FTP server, or file share. Alternatively, it need not represent a traditional path at all. For example, it could be a lookup key to locate the file within a NoSQL database environment. The format of this property is dependent on the nature of the source system.
Public propertyFileTitle The title of the file, EXCLUDING any path information, but INCLUDING file extension when appropriate.
Public propertyTransferDirection Specifies the direction of transfer. File transfer may proceed from requestor to responder (Push), or from responder to requester (Pull). In Push mode, the file token is contained within the request itself. In Pull mode, the file token is contained within the response message.
Public propertyTransferMode Specifies the mode of transfer. File data may be transferred within the CFX messages themselves (In-Band), or transferred via a separate secure protocol (Out-of-Band), such as HTTPS, SFTP, etc. Direct, in-band file transfer is not recommended for larger data files. Many AMQP message broker platforms limit the maximum total message size of an AMQP message. Microsoft's Azure message bus, for example, limits messages to 256KB for a standard subscription, and 1MB for a premium subscription. RabbitMQ recommends limiting messages to 128MB or less. Use OutOfBand transfer for larger file sizes.
Top
See Also