cciGetNodeName

This function returns the name of the specified node.

The name is assigned internally by the Message Brokers Toolkit and is unique in the message flow. The label that is assigned to a node by the message flow designer in the Message Flow Editor can be obtained by calling cciGetNodeAttribute to read the label attribute.

Syntax

CciSize  getNodeName (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 name.

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’s name.
length
The length, in CciChars, of the buffer allocated by the caller.

Return values

  • If successful, the node name 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 name, 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* targetNode = cciGetTargetNode(&rc,
                                          connection);

 

   CciChar targetNodeName [initialStringBufferLength];
   targetNodeNameLength = cciGetNodeName(&rc,
                                         targetNode,
                                         targetNodeName,
                                         initialStringBufferLength);
   /*you should now check the rc for unexpected values*/
   /*if rc is CCI_BUFFER_TOO_SMALL then you should resize and retry*/

}  
Related concepts
User exits
Related tasks
Developing a user exit
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:23:20

as35990_