During the design phase of your adapter, you need to decide which modes your adapter needs to handle. You also need to decide which type of data representation is best suited for your application if your adapter handles any or all of the following modes: Acquire, Process, and Deliver. See Chapter 2, “Modes” for descriptions of e-ADK modes.
Use the following criteria to decide how to handle the data from your application:
Tree (NDO) method of data representation:
Data is already parsed.
You can use Schema mode to easily load a format into the formatter.
If the metadata changes in the end system, any format is easily recreated using Schema mode.
Buffer method of data representation:
The adapter must contain the logic to parse the data buffer.
You must manually create formats to be used by the broker functionality of the integration server.
If the metadata changes in the end system, you must manually change the format.
If the data is contiguous, for example, the segment size within an IDoc format is established by SAP. Segments do not have delimiters; segment size is the controlling factor. For that example, consider using a buffer to manage your data.
If the data is noncontiguous, that is, the delimiters are used to separate segments, you should use an NNDOObject to manage your data in a tree-like structure.
You will need to implement the appropriate functions in your adapter to handle the modes and data representation that you have selected. For example, if you decide that your adapter should handle the acquire mode using buffered data, then you will need to implement acquireBuffer() inside your adapter. In addition, you need to implement the initAdapter() utility to remember configuration settings and allocate memory or data structure. The shutdownAdapter() functionality is used to clean up any allocated memory.
Finally, you may want to implement some special-purpose callback functions:
acknowledgePutData()
acknowledgePutBuffer()
handleQuietState()
commitDeliveredMessages()
Additional information about special-purpose callback functions is provided in e-ADK Programmer’s Reference.