Sun Adapter for Batch User's Guide

Using Data Streaming

Each data-streaming transfer involves two OTDs in a Collaboration as follows:

This section explains how the two data-streaming OTDs operate to effect the transfer of data.

Data-streaming Operation

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 eGate Enterprise Designer.

The InputStreamAdapter (highlighted) and OutputStreamAdapter nodes in the OTD are used for data streaming. This feature operates as follows:

The local file OTD is always the stream provider, and the FTP and record-processing OTDs are the consumers.


Note –

For an explanation of the adapter’s different types of OTDs, see Understanding Batch Adapter OTDs .


Data Streaming Versus Payload Data Transfer

Use of the InputStreamAdapter and OutputStreamAdapter nodes is an alternative to using the Payload node as follows:

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.

Data Streaming Scenarios

The four typical data-streaming scenarios are:

Consuming-stream Adapters

This section explains how to use consuming-stream adapters.

ProcedureTo obtain a stream

  1. Use the requestXXStream() method to obtain the corresponding XX stream.

ProcedureTo Use a Stream

  1. Perform the transfer using the methods provided by the stream.

ProcedureTo Dispose of a Stream

  1. Release any references to the stream.

  2. Release the stream (XX) using the releaseXXStream() method. Some of the OTDs support post-transfer commands. The Success parameter indicates whether these commands are executed. Do not close the stream.