Requestor

An application uses a requestor to send a request message and then wait for, and receive, the reply.

    Inheritance hierarchy:
    None

Parent topic: .NET interfaces


Constructors

    Summary of constructors:

    Constructor Description
    Requestor Create a requestor.


Requestor - Create Requestor

    Interface:
    Requestor(ISession sess, IDestination dest);

Create a requestor.

    Parameters:

      sess (input)
      A Session object. The session must not be transacted and must have one of the following acknowledgment modes:

      • AcknowledgeMode.AutoAcknowledge
      • AcknowledgeMode.DupsOkAcknowledge

      dest (input)
      A Destination object representing the destination where the application can send request messages.

    Thread context:
    The session associated with the requestor

    Exceptions:

    • XMSException


Methods

    Summary of methods:

    Method Description
    Close Close the requestor.
    Request Send a request message and then wait for, and receive, a reply from the application that receives the request message.


Close - Close Requestor

    Interface:
    void  Close();  

Close the requestor.

If an application tries to close a requestor that is already closed, the call is ignored.

Note: When an application closes a requestor, the associated session does not close as well. In this respect, XMS behaves differently compared to JMS.

    Parameters:
    None

    Returns:
    Void

    Thread context:
    Any

    Exceptions:

    • XMSException


Request - Request Response

    Interface:
    IMessage Request(IMessage requestMessage);

Send a request message and then wait for, and receive, a reply from the application that receives the request message.

A call to this method blocks until a reply is received or until the session ends, whichever is the sooner.

    Parameters:

      requestMessage (input)
      The Message object encapsulating the request message.

    Returns:
    A pointer to the Message object encapsulating the reply message.

    Thread context:
    The session associated with the requestor

    Exceptions:

    • XMSException