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
cniGetAttribute2
Use this function to get the value of an attribute on a specific node instance. It is called by the broker after all the attributes that the user deploys are set.
The results are written to the broker persistent configuration data to ensure that the node is configured correctly after the execution group process is stopped and started.
The responsibilities of
the node are to:
- Return a character representation of the attribute value.
- Throw an exception if an error occurs.
If both cniGetAttribute and cniGetAttribute2 functions are implemented, cniDefineNodeClass fails with return code CCI_INV_IMPL_FUNCTION.
Defined In | Type | Member |
---|---|---|
CNI_VFT | Optional | iFpGetAttribute2 |
Syntax
CciSize cniGetAttribute2(
int returnCode,
CciContext* context,
CciChar* attrName,
CciChar* buffer,
int bufsize);
Parameters
- context
- The address of the context for the instance of the node, as created by the node and returned by the cniCreateNodeContext function (input).
- returnCode (output)
- Pointer to an int. On return, the node must ensure that this int
stores a value that describes the status of completion. Possible return
codes are:
- CCI_SUCCESS
- CCI_ATTRIBUTE_UNKNOWN
- CCI_BUFFER_TOO_SMALL
- attrName
- The name of the attribute for which the value is to be retrieved (input).
- buffer
- The address of a buffer into which the attribute value is copied (output).
- bufsize
- The length, in CciChars, of the buffer specified in the buffer parameter (input).
Return values
- If successful, the attribute value 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 attribute value, returnCode is set to CCI_BUFFER_TOO_SMALL, and the number of CciChars required is returned.
- If the attrName is not known to this node, returnCode is set to CCI_ATTRIBUTE_UNKNOWN.