Click or drag to resize

FileTransferResponse Class

** NOTE: ADDED in CFX 1.4 **

Sent by an endpoint in response to a FileTransferRequest. 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.DataTransferFileTransferResponse

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

The FileTransferResponse type exposes the following members.

Constructors
 NameDescription
Public methodFileTransferResponse Default constructor
Top
Properties
 NameDescription
Public propertyFile For file transfers initiated at the destination (FileTransferDirection.Pull), contains information about the file to be transferred. For file transfers initiated by the source (FileTransferDirection.Push), 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 propertyResult Result of the request
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