These topics provide an overview of the Sun Adapter for Batch Projects that use Java Collaboration Definitions.
Sample data files for the Sun Adapter for Batch projects are included with the samples. See Input_Files_Readme.txt included with the sample data files for more information.
The prjBatch_Inbound_FTPIn_LocalFileOut Project demonstrates the following:
The BatchInbound Adapter subscribes to a local directory and periodically checks for a specific file. If the file is present, it renames the file with a GUID, and triggers the Java Collaboration.
The BatchFTP Adapter gets the associated target file from the FTP external system and writes the file content to the BatchLocalFile Adapter payload.
The BatchLocalFile Adapter gets the GUID file name from the BatchInbound Adapter, and publishes its payload to a file in a local directory.
Stream allows you to read large files by streaming the data. Three of the Batch OTDs are able to receive streamed data: BatchFTP, BatchLocalFile, and BatchRecord. The prjBatch_Streaming project demonstrates the following:
The File Adapter polls the input directory periodically. When it sees a specified file, it triggers the Collaboration.
The BatchFTP Adapter streams data to the BatchLocalFileAdapter.
The BatchLocalFile Adapter renames the resulting data file and moves the output data to a new location.
The BatchLocalFile streams the new created file to the BatchRecord Adapter.
The BatchRecord Adapter parses the file in the output file and publishes the parsed records to the File Adapter.
The FileAdapter publishes the files to a local directory.
This sample works with an input file of any size. but to see the streaming feature in action, use a larger file.
The prjBatch_Recordproject demonstrates the following:
TheFile Adapter polls the input directory periodically. When it sees a specified file, it triggers the Collaboration.
When triggered, the BatchRecord_Create Adapter creates a record with an incrementing number (string), and puts the record into the payload along with the specified record delimiter.
When the payload contains ten records, the payload out using the File Adapter. The payload is published to the BatchRecord_Parse Adapter.
The BatchRecord_Parse Adapter parses the ten records and publishes each record to the File Adapter.
The FileOut Adapter writes the files to a local directory.
The prjBatch_Secure project contains three scenarios to demonstrate the SSL and SSH secure file transfer functions of the BatchFTPOverSSL, BatchSFTP, and BatchSCP OTDs.
The project uses inbound File Adapters to poll an external directory for a specific input file. When the file is present, the appropriate File Adapter triggers a Collaboration to do the following:
Scenario 1 - FTP Over SSL
Gets a file from a remote directory and publishes it to a local directory.
Publishes a file from local directory to a remote directory.
Downloads a file from a remote directory to a local directory.
Uploads a file from a local directory to remote directory.
Creates remote directories and lists them.
Deletes remote directories and lists the results.
Scenario 2 - SFTP
Gets a file from remote directory and publishes it to a local directory.
Creates a new remote directory
Changes directories to the newly created remote directory, and publishes a file there.
Renames the published file.
Deletes an unwanted file from remote directory.
Scenario 3 - SCP
Recursively gets a file from a remote directory and publishes it to a local directory.
Recursively puts a file from a local directory to a remote directory.
Gets a file (non-recursive) from a remote directory and publishes it to a local directory.
Puts a file (non-recursive) from a local directory to a remote directory.