Merge pull request #2258 from likema/log-msg-reset-ostream
[ACE_TAO.git] / TAO / tests / POA / On_Demand_Activation / Servant_Locator.h
blob1801d1d1e4fea3498d8b97801402ab14448c83b7
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Servant_Locator.h
7 * Defines a ServantLocator class, used with a POA having a
8 * NON_RETAIN policy
10 * @author Irfan Pyarali
12 //=============================================================================
15 #include "tao/PortableServer/PortableServer.h"
16 #include "tao/PortableServer/ServantLocatorC.h"
17 #include "tao/LocalObject.h"
19 #include "tao/ORB.h"
21 class ServantLocator :
22 public virtual PortableServer::ServantLocator,
23 public virtual ::CORBA::LocalObject
26 // = TITLE
27 // This class is used by a POA with USE_SERVANT_MANAGER and
28 // NON_RETAIN policy.
29 public:
30 /// constructor
31 ServantLocator (CORBA::ORB_ptr orb);
33 /// This method is invoked by a POA whenever it receives a request
34 /// for test object that is not currently active.
35 virtual PortableServer::Servant preinvoke (const PortableServer::ObjectId &oid,
36 PortableServer::POA_ptr adapter,
37 const char *operation,
38 PortableServer::ServantLocator::Cookie &the_cookie);
40 /// This method is invoked whenever a test servant completes a
41 /// request.
42 virtual void postinvoke (const PortableServer::ObjectId &oid,
43 PortableServer::POA_ptr adapter,
44 const char *operation,
45 PortableServer::ServantLocator::Cookie the_cookie,
46 PortableServer::Servant the_servant);
48 private:
49 CORBA::ORB_var orb_;