Chapter 50. How to add a new FileTransfer CopyProtocol

FileTransfer protocols can be of two types: external or internal. Examples of external protocols are: scp and rcp. While examples of internal protocols are Unicore and Globus.

Usually external FileTransfer happens before the deployment of the process. On the other hand, internal FileTransfer happens at the same time of the process deployment, because the specific tools provided by the process are used. This implies that internal FileTransfer protocols can not be used with other process (ex: unicore file transfer can not be used when deploying with ssh), but the other way around is valid (ex: scp can be used when deploying with unicore).

50.1. Adding external FileTransfer CopyProtocol

  • Implement the protocol class. This is done inside the package: org.objectweb.proactive.core.process.filetransfer; by extending the abstract class AbstractCopyProtocol.

  • FileTransferWorkshop: Add the name of the protocol to array ALLOWED_COPY_PROTOCOLS[]

  • FileTransferWorkshop: Add the object named based creation to factory method: copyProtocolFactory(String name){...}

Note: Choosing the correct name for the protocol is simple, but must be done carefully. All names already in the array ALLOWED_COPY_PROTOCOLS are forbidden. This includes the name 'processDefault', which is also forbidden. In some cases 'processDefault' will correspond to an external FileTransfer protocol (ex: ssh with scp), and in some cases to an internal protocol (ex: unicore with unicore)

50.2. Adding internal FileTransfer CopyProtocol

  • Implement the method protected boolean internalFileTransferDefaultProtocol() inside the process class. Note that this method will be called if the processDefault keyword is specified in the XML Descriptor Process Section. Therefore, this method usually must return true, so no other FileTransfer protocols will be tried.

  • FileTransferWorkshop: Add the name of the protocol to array ALLOWED_COPY_PROTOCOLS[]

Note: When adding an internal FileTransfer protocol, nothing must be modified or added to the copyProtocolFactory(){} method.