WebSphere Message Brokers
File: as24699_
Writer: Lorraine Waitt

Reference topic

This build: July 31, 2007 21:38:44

cniGetAttributeName2

This function returns the name of a node attribute specified by an index. It is invoked by the message broker when the broker requires the names of the attributes that are supported by a particular instance of a node. The function must guarantee to return the attributes in a known, defined order, and to return the attribute name that is represented by the index parameter.

If both cniGetAttributeName and cniGetAttributeName2 are implemented, cniDefineNodeClass fails with CCI_INV_IMPL_FUNCTION.

Defined In Type Member
CNI_VFT Optional iFpGetAttributeName2

Syntax

CciSize cniGetAttributeName2(
  int          returnCode,
  CciContext*  context,
  int          index,
  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 should 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
index
Specifies the index of the attribute name (input). The index of the attributes starts from zero.
buffer
The address of a buffer into which the attribute name is copied (output).
bufsize
The length, in CciChars, of the buffer specified in the buffer parameter (input).

Return values

  • If successful, the attribute 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 attribute name, returnCode is set to CCI_BUFFER_TOO_SMALL, and the number of CciChars required is returned.
  • If the end of the list of attributes is reached and the attribute name is not found, returnCode is set to CCI_ATTRIBUTE_UNKNOWN. For example, when index is greater than n-1, where n is the number of attributes for this node.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:38:44

as24699_ This topic's URL is: