Overview | Returns the next available response, after issuing multiple deferred requests in parallel. |
Original class | CORBA::ORB |
Exceptions | CORBA::SystemException |
Intended Usage
The CORBA::ORB::get_next_response method is intended to be used by client applications that are using the Dynamic Invocation Interface (DII), to obtain the next available response after sending multiple deferred requests in parallel (for example, using CORBA::ORB::send_multiple_requests_deferred or CORBA::Request::send_deferred). The order in which responses are received does not necessarily match the order in which requests were sent. If no response is currently available, this method will block until a response is available. To avoid blocking, use the CORBA::ORB::poll_next_reponse method.
Syntax
CORBA::Status get_next_response (CORBA::Request_ptr& req);
Input parameters
Return values
Example
/* Assume the following IDL interface: interface testObject { string testMethod (in long input_value, out float out_value); }; */ #include "corba.h" ... /* assume cop initialized */ extern CORBA::ORB_ptr cop; /* Create the Request object */ CORBA::Object_var my_proxy = /* get a proxy somehow */ CORBA::Request_ptr req = my_proxy->_request ("testMethod"); req->add_in_arg() <<= (corba::long) 12345; /* sets type and value */ corba::float out_float; req -> add_out_arg() <<= out_float; /* sets type */ req -> set_return_type (CORBA::_tc_string); ... while (!cop->poll_next_response()) { /* Wait */ ... }; /* determine if a response to a deferred request is available */ cop->get_next_response(req); /* return the next available response */ ...