BOA::request_pending

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

CORBA::Boolean
A zero return value indicates that there are no outstanding requests waiting to be processed. A one return value indicates that there is at least one request pending.

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();
    ...
  }

Related reference
CORBA module



Searchable topic ID:   rcor_modb11
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_modb11.html

Library | Support | Terms of Use | Feedback