This function creates a context for an instance of a node object. It is called by the integration node whenever an instance of a node object is constructed. Nodes are constructed when a message flow is deployed by the integration node, or when the integration server is started.
Defined In | Type | Member |
---|---|---|
CNI_VFT | Mandatory | iFpCreateNodeContext |
CciContext* cniCreateNodeContext(
CciFactory* factoryObject,
CciChar* nodeName,
CciNode* nodeObject);
If successful, the address of the node context is returned. Otherwise, a value of zero (CCI_NULL_ADDR) is returned.
static char* functionName = (char *)"_Switch_createNodeContext()";
NODE_CONTEXT_ST* p;
/* Allocate a pointer to the local context */
p = (NODE_CONTEXT_ST *)malloc(sizeof(NODE_CONTEXT_ST));
if (p) {
/* Clear the context area */
memset(p, 0, sizeof(NODE_CONTEXT_ST));
/* Save our node object pointer in our context */
p->nodeObject = nodeObject;
/* Save our node name */
CciCharNCpy((CciChar*) &p->nodeName, nodeName, MAX_NODE_NAME_LEN);
}
else
/* Handle errors */