2 //=============================================================================
4 * @file Servant_Locator.h
6 * Defines a MyFooServantLocator class , used with a POA having
9 * @author Irfan Pyarali
11 //=============================================================================
14 #ifndef _SERVANT_LOCATOR_H_
15 #define _SERVANT_LOCATOR_H_
17 #include "tao/PortableServer/PortableServer.h"
18 #include "tao/PortableServer/ServantLocatorC.h"
22 * @class Servant_Locator
24 * @brief This class is used by a POA with USE_SERVANT_MANAGER and
27 class Servant_Locator
: public PortableServer::ServantLocator
30 Servant_Locator (CORBA::ORB_ptr orb_ptr
);
36 /// This method is invoked by a POA whenever it receives a request
37 /// for MyFoo object that is not currently active.
38 virtual PortableServer::Servant
preinvoke (const PortableServer::ObjectId
&oid
,
39 PortableServer::POA_ptr adapter
,
40 const char *operation
,
41 PortableServer::ServantLocator::Cookie
&the_cookie
);
43 /// This method is invoked whenever a MyFooServant completes a
45 virtual void postinvoke (const PortableServer::ObjectId
&oid
,
46 PortableServer::POA_ptr adapter
,
47 const char *operation
,
48 PortableServer::ServantLocator::Cookie the_cookie
,
49 PortableServer::Servant the_servant
);
52 void set (CORBA::Object_var obj
);
55 CORBA::ORB_var orb_var_
;
58 CORBA::Object_var objref_
;
61 #endif /* _SERVANT_LOCATOR_H */