All adapters follow a set of adapter life cycle events.
API | Description |
---|---|
bool reset(void* adapters); | This is the first life cycle API. Call this API to initialize both input and output adapters. |
void start(void* adapter); | Call this API immediately after reset and use it for data processing specific to the adapter implementation. Call this API for both input and output adapters. |
void* getNext(void* adapter); | This API reads data and returns a pointer to the data in a format the server understands. The adapter shared utility library provides data conversion functions. Call this API for input adapters only. |
void putNext(void* adapter,void* stream); | This API converts presented data into a format the server understands, and writes it according to the specified adapter implementation. The adapter shared utility library provides data conversion functions. Call this API for output adapters only. |
void stop(void* adapter); | Call this API to stop an adapter. This API gets called for both input and output adapters. |
void cleanup(void* adapter); | Call this API to perform clean-up activities after an adapter is stopped. |
void commitTransaction(void* adapter); | This API notifies an output adapter when a transaction ends. Call this API for output adapters only. |
void putStartSync(void* adapter); | This API notifies the adapter implementation that the base data is being sent. Call this API for output adapters only. |
void putEndSync(void* adapter); | This API notifies the adapter implementation that the base data has been sent. Call this API for output adapters only. |
void purgePending)void* adapter); | This API instructs an output adapter to purge pending data. Call this API for output adapters only. |
bool isOutBase(void* adapter); | Call this API to determine whether the adapter expects to receive the output for the base contents of the stream. Call this API for output adapters only. |