summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/IFR_Service/Servant_Locator.h
blob: a0e631479f255a5c8129453dc2e225bc1e8e7df3 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// $Id$

//==========================================================================
//
// = LIBRARY
//     TAO/orbsvcs/IFR_Service
//
// = FILENAME
//     Servant_Locator.h
//
// = DESCRIPTION
//     Defines a servant activator subclass, used by the IFR and its POA
//
// = AUTHOR
//     Jeff Parsons
//
//==========================================================================

#ifndef IFR_SERVANT_LOCATOR_H
#define IFR_SERVANT_LOCATOR_H

#include "Repository_i.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

class IFR_ServantLocator : public PortableServer::ServantLocator
{
  // = TITLE
  //    IFR_ServantLocator
  //
  // = DESCRIPTION
  //    This class is used by the Interface Repository to create
  //    servants on demand
  //
public:
  IFR_ServantLocator (TAO_Repository_i *repo);
  // constructor

  virtual PortableServer::Servant preinvoke (
      const PortableServer::ObjectId &oid,
      PortableServer::POA_ptr adapter,
      const char *operation,
      PortableServer::ServantLocator::Cookie &the_cookie
      TAO_ENV_ARG_DECL
    )
    ACE_THROW_SPEC ((CORBA::SystemException,
                     PortableServer::ForwardRequest));
  // This method is invoked by the IFR's POA whenever it receives a request
  // for an IR object.

  virtual void postinvoke (
      const PortableServer::ObjectId &oid,
      PortableServer::POA_ptr adapter,
      const char *operation,
      PortableServer::ServantLocator::Cookie the_cookie,
      PortableServer::Servant the_servant
      TAO_ENV_ARG_DECL
    )
    ACE_THROW_SPEC ((CORBA::SystemException));
  // This method is invoked whenever an IR object servant completes a
  // request.


private:
  TAO_Repository_i *repo_;
  // Passed in to each created servant.
};

#endif /* IFR_SERVANT_LOCATOR_H */