WebSphere Message Broker, Version 8.0.0.7
Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS
See information about the latest product version
See information about the latest product version
cpiCreateContext
This function creates a user-defined extension context associated with a parser object. It is called by the broker when an instance of a parser object is constructed or allocated. This action occurs when a message flow causes the message data to be parsed; the broker constructs or allocates a parser object to acquire the appropriate section of the message data.
Before this function is called, the broker creates a name element as the effective root element for the parser. However, this element is not named. The parser must name this element in the cpiSetElementName function.
The
responsibilities of the extension are to:
- Allocate all parser-instance specific data areas (such as context) that might be required.
- Perform all additional resource acquisition or initialization that might be required.
- Return the address of the context to the calling function. Whenever an implementation function for this parser instance is called, the appropriate context is passed as an argument to that function. Therefore, a user-defined parser developed in C need not maintain its own static pointers to per-instance data areas.
Defined In | Type | Member |
---|---|---|
CPI_VFT | Mandatory | iFpCreateContext |
Syntax
void cpiCreateContext(
CciParser* parser);
Parameters
- parser
- The address of the parser object (input).
Return values
If successful, the address of the user-defined extension context is returned. Otherwise, a value of zero is returned.