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
cciGetNodeType
This function returns the type of the specified node.
Syntax
CciSize cciGetNodeType (int* returnCode,
CciNode* node,
CciChar* value,
CciSize length);
Parameters
- returnCode (output)
- Receives the return code from the function (output).
- CCI_INV_BUFFER_TOO_SMALL
The provided buffer was not large enough to hold the value of node’s type.
- CCI_INV_BUFFER_TOO_SMALL
- node (input)
- This is a handle to a node.
- value (output)
- Address of a buffer, allocated by the caller to hold the value of the node type.
- length
- The length, in CciChars, of the buffer allocated by the caller.
Return values
- If the function is successful, the node type is copied into the supplied buffer and the number of CciChar characters copied is returned.
- If the buffer is not large enough to contain the node type, returnCode is set to CCI_BUFFER_TOO_SMALL, and the number of CciChars required is returned.
Example
void myPropagatedMessageCallback(
CciMessage* message,
CciMessage* localEnvironment,
CciMessage* exceptionList,
CciMessage* environment,
CciConnection* connection){
int rc = CCI_SUCCESS;
CciNode* sourceNode = cciGetSourceNode(&rc,
connection);
/*you should now check the rc for unexpected values*/
CciChar sourceNodeType[initialStringBufferLength];
sourceNodeTypeLength = cciGetNodeType(&rc,
sourceNode,
sourceNodeType,
initialStringBufferLength);
/*you should now check the rc for unexpected values*/
/*if rc is CCI_BUFFER_TOO_SMALL then you should resize and retry*/