blob: 13c3e5857ab5a97d603f169b5be8bdbf780d33cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// -*- C++ -*-
//=============================================================================
/**
* @file Servant_Locator.h
*
* $Id$
*
* Defines a ServantLocator class, used with a POA having a
* NON_RETAIN policy
*
*
* @author Irfan Pyarali
*/
//=============================================================================
#include "tao/PortableServer/PortableServer.h"
#include "tao/PortableServer/ServantLocatorC.h"
#include "tao/LocalObject.h"
#include "tao/ORB.h"
class ServantLocator :
public virtual PortableServer::ServantLocator,
public virtual ::CORBA::LocalObject
{
// = TITLE
// This class is used by a POA with USE_SERVANT_MANAGER and
// NON_RETAIN policy.
public:
/// constructor
ServantLocator (CORBA::ORB_ptr orb);
/// This method is invoked by a POA whenever it receives a request
/// for test object that is not currently active.
virtual PortableServer::Servant preinvoke (const PortableServer::ObjectId &oid,
PortableServer::POA_ptr adapter,
const char *operation,
PortableServer::ServantLocator::Cookie &the_cookie);
/// This method is invoked whenever a test servant completes a
/// request.
virtual void postinvoke (const PortableServer::ObjectId &oid,
PortableServer::POA_ptr adapter,
const char *operation,
PortableServer::ServantLocator::Cookie the_cookie,
PortableServer::Servant the_servant);
private:
/// Counter for number of invocations of this.
int counter_;
CORBA::ORB_var orb_;
};
|