WebSphere Message Brokers
File: as07460_
Writer: Lorraine Waitt

Reference topic

This build: July 31, 2007 21:37:12

cniGetAttribute

This function gets the value of an attribute on a specific node instance.

Restriction: This function imposes a restriction on the length of the attribute value. This function is provided only for compatibility with earlier versions. You should implement cniGetAttribute2.
This function is invoked by the broker:
  • Before the nodes configuration is deployed in order to ascertain default values of any attributes that might override attributes owned by the framework.
  • After setting the deployed configuration in order to write the configuration to the broker’s database. This call ensures that the configuration persists across shutdown and restarts of the execution group
The responsibilities of the node are to:
  1. Return a character representation of the attribute value.
  2. Throw an exception if an error occurs.
If both cniGetAttribute and cniGetAttribute2 are implemented, cniDefineNodeClass fails with CCI_INV_IMPL_FUNCTION.
Defined In Type Member
CNI_VFT Optional iFpGetAttribute

Syntax

int cniGetAttribute(
  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).
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 bytes, of the buffer specified in the buffer parameter (input).

Return values

If successful, zero is returned, and the character representation of the value of the attribute is returned in the specified buffer. If the name of the attribute does not identify one supported by the node, a non-zero value is returned.

Notices | Trademarks | Downloads | Library | Support | Feedback

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

as07460_ This topic's URL is: