| Installing Upgrading Designing Configuring Deploying Monitoring Administering Troubleshooting Reference JBI Components | |
| Close Print View | |
| Designing: Using Data Streaming |
|
Creating a Runtime Environment
Designing Business Processes in the Sun Business Process Manager
Working with TCP/IP HL7 Collaborations
Developing Sun Master Indexes (Repository)
Developing Sun Master Patient Indexes
Developing OTDs for Application Adapters
Developing OTDs for Communication Adapters
Developing OTDs for Database Adapters
Developing OTDs for Web Server Adapters
Designing with Application Adapters
Designing with Communication Adapters
Adding the DLL file to the Path for the COM/DCOM Application Server Process
To Add the DLL file to the Path for the Application Server Process
Installing the MSMQ DLL and JNI Files
To Download the MSMQ DLLs and Runtime JNI
To Add the DLL Files to the Environment Path
Enabling Rollback When an MSMQ Message Fails
Streaming Data Between Components with the Batch Adapter
Introduction to Data Streaming
Overcoming Large-file Limitations
Designing with Web Server Adapters
Designing with Sun JCA Adapters
Each data-streaming transfer involves two OTDs in a Collaboration as follows:
One provides the stream adapter.
The other consumes the stream adapter to perform the data transfer.
Caution - Implementing InputStream must support skip() with negative numbers as an argument.
This section explains how the two data-streaming OTDs operate to effect the transfer of data.
Each of the OTDs in the Batch Adapter exposes stream adapter nodes that enable any OTD to participate in data-streaming transfers. The nodes are named InputStreamAdapter and OutputStreamAdapter. You can associate the stream adapters by using the drag-and-drop features of the Java CAPS IDE.
The InputStreamAdapter (highlighted) and OutputStreamAdapter nodes in the OTD are used for data streaming. This feature operates as follows:
Stream-adapter consumers: The FTP and the record-processing OTDs can only consume stream adapters. Therefore, their stream-adapter nodes are write-only. Their node values can be set (modified).
Stream-adapter provider: The local file OTD can only provide stream adapters, so its stream-adapter nodes are read-only. Its node value can only be retrieved.
The local file OTD is always the stream provider, and the FTP and record-processing OTDs are the consumers.
Use of the InputStreamAdapter and OutputStreamAdapter nodes is an alternative to using the Payload node as follows:
Use these stream adapter nodes to transfer data if you want data streaming.
Use the Payload node for a data transfer without data streaming (payload data transfer).
All operations that, in payload data transfer, read from the Payload node require the InputStreamAdapter node when you are setting up data streaming. Using the same logic, all operations that, in payload data transfer, write to the Payload node require OutputStreamAdapter node for data streaming.
Do not confuse the stream adapter nodes with the get() and put()
methods on the OTDs. For example, the BatchFTP OTD’s client interface get() method
writes to the Payload node during a payload transfer, so it requires an
OutputStreamAdapter node to write to for data streaming. In contrast, the record-processing OTD’s
get() method reads from the Payload node during a payload transfer, so for data
streaming, get() requires an inputStreamAdapter node to read from.
The four typical data-streaming scenarios are:
Transfer data from a local file system (BatchLocalFile) to a record-processing (BatchRecord) setup. This scenario uses the InputStreamAdapter OTD node (see Data Streaming Scenarios).

Transfer data from a record-processing (BatchRecord) setup to a local file system (BatchLocalFile) using the OutputStreamAdapter OTD node (see Data Streaming Scenarios).

Transfer data from a local file system (BatchLocalFile) to a remote FTP (BatchFTP) setup. This scenario uses the InputStreamAdapter OTD node (see Data Streaming Scenarios).

Transfer data from a remote FTP server (BatchFTP) to a local file system (BatchLocalFile) using the OutputStreamAdapter OTD node (see Data Streaming Scenarios).

This section explains how to use consuming-stream adapters.
requestXXStream() method to obtain the corresponding XX stream.releaseXXStream() method. Some of the OTDs support post-transfer
commands. The Success parameter indicates whether these commands are executed. Do not close
the stream.