3.5.4.1.1 State (Opnum 16)

The State method is received by the server in an RPC_REQUEST packet. In response, the server MUST return the represented OutgoingQueue.State.

 [propget] HRESULT State(
   [out, retval] long* plState
 );

plState: A pointer to a long that corresponds to the QUEUE_STATE (section 2.2.2.19) enumeration.

Return Values: The method MUST return S_OK (0x00000000) to indicate success or an implementation-specific error HRESULT on failure.

When the server processes this call, it MUST follow these guidelines:

  • If the ObjectIsInitialized instance variable is False:

    • The server MUST return MQ_ERROR_UNINITIALIZED_OBJECT (0xC00E0094), and MUST take no further action.

  • The server MUST generate a QMMgmt Get Info event with the following inputs:

    • iPropID = PROPID_MGMT_QUEUE_STATE

  • If the rStatus return value is not equal to MQ_OK (0x00000000), the server MUST return rStatus and MUST take no further action.

  • Else:

    • If the value of the returned rPropVar was "LOCAL CONNECTION":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_LOCAL_CONNECTION, and MUST take no further action.

    • If the value of the returned rPropVar was "DISCONNECTED":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_DISCONNECTED, and MUST take no further action.

    • If the value of the returned rPropVar was "LOCKED":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_LOCKED, and MUST take no further action.

    • If the value of the returned rPropVar  was "WAITING":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_WAITING, and MUST take no further action.

    • If the value of the returned rPropVar  was "NEED VALIDATION":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_NEEDVALIDATE, and MUST take no further action.

    • If the value of the returned rPropVar  was "ONHOLD":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_ONHOLD, and MUST take no further action.

    • If the value of the returned rPropVar  was "INACTIVE":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_NONACTIVE, and MUST take no further action.

    • If the value of the returned rPropVar  was "CONNECTED":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_CONNECTED, and MUST take no further action.

    • If the value of the returned rPropVar  was "DISCONNECTING":

      • The server MUST set the plState output variable to MQ_QUEUE_STATE_DISCONNECTING, and MUST take no further action.