cciInputMessageCallback

This is a function that can be registered as a callback and is invoked every time a message is read by an input node, and before that message is propagated down the message flow. It is invoked for every input message read within the execution group where the callback was registered, if the user exit state is active. The callback is registered by providing a pointer to the function as the iFpInputMessageCallback field of the CCI_UE_VFT struct passed to cciRegisterUserExit.

Syntax

typedef void (*cciInputMessageCallback)     ( 
                                 CciDataContext*  userContext,
                                 CciMessage*      message,
                                 CciMessage*      localEnvironment,
                                 CciMessage*      exceptionList,
                                 CciMessage*      environment,
                                 CciMessageOrigin messageOrigin,
                                 CciNode*         inputNode);

Parameters

userContext (input)
This is the value that was passed to the cciRegisterUserExit function.
message
This is a handle to the message object. The user exit code must not update this tree.
localEnvironment
This is a handle to the local environment object.
exceptionList
This is a handle to the exception list object.
environment
This is a handle to the environment object for the current message flow.
messageOrigin
Depending on the type of input node, the message may have originated from a bitstream (CCI_MESSAGE_ORIGIN_BITSTREAM) or from a tree (CCI_MESSAGE_ORIGIN_TREE). The user exit can therefore access one of these without causing processing by the parser. For example, in the case of the MQInputNode, you can safely access the bitstream whereas, in the case of the JMS input node, you can safely access the tree. The bitstream can be accessed by calling cniBufferPointer, cniBufferSize, or cniBufferByte. The tree can be accessed by calling cniRootElement and using the usual syntax element navigation functions (for example, cniFirstChild ).
Note: Although this parameter advises the user exit as to what it can safely access without causing processing by the parser, it is possible that the user exit code could ignore this advice and effectively alter the parse timing.
inputNode
This is a handle to the input node which reads this input message. It can be used to make calls to functions such as cciGetNodeName, cciGetNodeType, and cniGetBrokerInfo.

Return values

None.

Example

void myInputMessageCallback(
                      CciDataContext*  userContext,
                      CciMessage*      message,
                      CciMessage*      localEnvironment,
                      CciMessage*      exceptionList,
                      CciMessage*      environment,
                      CciMessageOrigin messageOrigin,
                      CciNode*         inputNode){
…
…
}
Related concepts
Developing user exits
Related tasks
Developing a user exit