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

cniIsTerminalAttached

Use this function to check whether a terminal is attached to another node by a connector. It returns an integer value that specifies whether the specified terminal object is attached to one or more terminals on other message flow nodes.

Use this function to test whether a message can be propagated to a terminal; you do not have to call this function before you propagate a message with the cniPropagate utility function. Use the cniIsTerminalAttached function to modify the node behavior when a terminal is not connected.

Syntax

int cniIsTerminalAttached(
  int*          returnCode,
  CciTerminal*  terminalObject);

Parameters

returnCode
The return code from the function (output).
Possible return codes are:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_TERMINAL_OBJECT
terminalObject
The address of the input or output terminal to be checked for an attached connector (input). The address is returned from cniCreateOutputTerminal.

Return values

  • If the terminal is attached to another node by a connector, a value of 1 is returned.
  • If the terminal is not attached, or a failure occurred, a value of zero is returned.
  • If a failure occurs, the value of the returnCode parameter indicates the reason for the error.

Example

  if (terminalObject) {
    if (cniIsTerminalAttached(&rc, terminalObject)) {
      if (rc == CCI_SUCCESS) {
        retvalue = cniPropagate(
                                &rc, 
                                terminalObject, 
                                localEnvironment, 
                                exceptionList, 
                                message);
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:47:29


Reference topicReference topic | Version 8.0.0.7 | as07550_