diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-16 01:01:44 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-16 01:01:44 +0000 |
commit | 8b7820baee66523a221d9b2f8dfd89a586b4bde9 (patch) | |
tree | 3ee96e27852c764910250503c59860d3d07bfa1a /TAO/examples/POA/On_Demand_Activation/Servant_Locator.h | |
parent | a0e72e6ac078389ddd1a8ac96c31436c33be44f0 (diff) | |
download | ATCD-8b7820baee66523a221d9b2f8dfd89a586b4bde9.tar.gz |
.
Diffstat (limited to 'TAO/examples/POA/On_Demand_Activation/Servant_Locator.h')
-rw-r--r-- | TAO/examples/POA/On_Demand_Activation/Servant_Locator.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/TAO/examples/POA/On_Demand_Activation/Servant_Locator.h b/TAO/examples/POA/On_Demand_Activation/Servant_Locator.h new file mode 100644 index 00000000000..b65c72e5886 --- /dev/null +++ b/TAO/examples/POA/On_Demand_Activation/Servant_Locator.h @@ -0,0 +1,53 @@ +// $Id$ + +//================================================================================ +// +// = LIBRARY +// TAO/tests/POA/On_Demand_Activation/Servant_Locator +// +// = FILENAME +// Servant_Locator.h +// +// = DESCRIPTION +// Defines a MyFooServantLocator class , used with a POA having +// a NON_RETAIN policy +// +// = AUTHOR +// Irfan Pyarali +// +//================================================================================== + +#include "tao/corba.h" + +class MyFooServantLocator : public POA_PortableServer::ServantLocator +{ + // = TITLE + // This class is used by a POA with USE_SERVANT_MANAGER and + // NON_RETAIN policy. +public: + MyFooServantLocator (CORBA::ORB_ptr orb); + // constructor + + virtual PortableServer::Servant preinvoke (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr adapter, + const char *operation, + PortableServer::ServantLocator::Cookie &the_cookie, + CORBA::Environment &env); + // This method is invoked by a POA whenever it receives a request + // for MyFoo object that is not currently active. + + virtual void postinvoke (const PortableServer::ObjectId &oid, + PortableServer::POA_ptr adapter, + const char *operation, + PortableServer::ServantLocator::Cookie the_cookie, + PortableServer::Servant the_servant, + CORBA::Environment &env); + // This method is invoked whenever a MyFooServant completes a + // request. + +private: + int counter_; + // Counter for number of invocations of this. + + CORBA::ORB_var orb_; +}; |