...
The File Transfer Listener monitors a specified local or shared directory. It detects new files in that directory and sends the content of those files as a request to the virtual asset that uses this listener. The virtual asset then passes the request to its responders. The matching responder provides a response for that request, then the File Transfer Listener writes the response to another directory. For example, this functionality could be used to simulate an application that listens to a file showing up within a specific directory, processes it, and then responds by placing a modified version of that file—or file, or a different file— file, in another local or shared directory.
...
The listener can be installed from the UI or command line.
UI Installation
- Choose Go to Parasoft > Preferences and selectclick System Properties in the sidebar menu.
- Click Add JARs and choose select the filetransferlistener.jar file in the file chooser.
- Click Apply.
- Restart Virtualize.
Command Line Installation
Add the filetransferlistener.jar file to the system.properties.classpath
property in your settings properties file. For example:
system.properties.classpath=<path to jar><PATH_TO_JAR>/filetransferlistener.jar
...
After installation, the File Transfer Listener will be available in the Transports> Transports > Custom tab of the Virtual Asset configuration panel. Double-click a virtual asset’s Virtualize Server node to open this panel.
...
If multiple custom listeners are available, you can select the one you want to use from the Select Implementation drop-down menuImplementation menu.
You can configure correlations, transformations, responses, etc. and so on in the responders associated with the virtual asset.
...
Source Directory | Specify which local or shared directory you want to monitor for new files. You can enter an absolute path, a relative path (in relation to the |
---|---|
Source Encoding | Specify the character encoding for the contents of the source file. The system default is used if this option is not specified. If the source file contains a recognized BOM (UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE), it will be used to determine the character encoding. |
Target Directory | Specify the local or shared directory to which you want files transferred. You can enter an absolute path, a relative path (in relation to the VirtualAssets project), or a directory (for example, \\file.parasoft.com\Development\tmp\user\OUT ). |
Target File Name | Specify the desired name for the transferred file. You can use variables such as %d (current date) %t (current time), %b (base filename without extension), and %e (extension). If this field is empty, the original file name will be used. |
Poll Interval | Specify how frequently you want to check the specified directory. The default is 1000 milliseconds. |
Log Level | Specify how much information you want logged to the console and the Event Monitoring view. The default is 2 (warn). |
...