Overview | Determines whether there are any requests in a server waiting to be serviced. |
Original class | CORBA module: BOA Class |
Intended Usage
This method is intended to be used by a server application to determine whether there are any outstanding requests (from remote clients) waiting to be serviced. Hence, this method can be used to determine whether a blocking call to CORBA::BOA::execute_next_request will block.
This call does not modify the queue of waiting requests.
This method is an IBM extension to the CORBA specification.
Syntax
virtual CORBA::Boolean request_pending ();
Return values
Example
#include "corba.h" void main(int argc, char* argv[]) { /* Initialize the server's ImplementationDef, ORB, and BOA: */ CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository; /* Assume dummyServer is already registered in the implementation repository */ CORBA::ImplementationDef_ptr imp = implrep->find_impldef_by_alias ("dummyServer"); static CORBA::ORB_ptr op = CORBA::ORB_init(argc, argv, "DSOM"); static CORBA::BOA_ptr bp = op->BOA_init(argc, argv, "DSOM_BOA"); bp->impl_is_ready(imp); ... /* Determine if there's request waiting */ CORBA::Boolean retval = bp->request_pending(); ... /* Stop processing requests */ bp->interrupt_server(); ... }
#include "corba.h" void main(int argc, char* argv[]) { /* Initialize the server's ImplementationDef, ORB, and BOA: */ CORBA::ImplRepository_ptr implrep = new CORBA::ImplRepository; /* Assume dummyServer is already registered in the implementation repository */ CORBA::ImplementationDef_ptr imp = implrep->find_impldef_by_alias ("dummyServer"); extern static CORBA::ORB_ptr op; /* assume previously initialized */ extern static CORBA::BOA_ptr bp; /* assume previously initialized */ bp->impl_is_ready(imp); ... /* Determine if there's request waiting */ CORBA::Boolean retval = bp->request_pending(); ... /* Stop processing requests */ bp->interrupt_server(); ... }