summaryrefslogtreecommitdiff
path: root/TAO/examples/POA/On_Demand_Activation/Servant_Locator.h
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-09-16 01:01:44 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-09-16 01:01:44 +0000
commit8b7820baee66523a221d9b2f8dfd89a586b4bde9 (patch)
tree3ee96e27852c764910250503c59860d3d07bfa1a /TAO/examples/POA/On_Demand_Activation/Servant_Locator.h
parenta0e72e6ac078389ddd1a8ac96c31436c33be44f0 (diff)
downloadATCD-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.h53
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_;
+};