Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / POA / Forwarding / Servant_Activator.h
blob5c6414e12af823b1b0e2ae51bdba845d5ade2781
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Servant_Activator.h
7 * Defines a ServantActivator class, used with a POA having a
8 * RETAIN policy
10 * @author Irfan Pyarali Michael Kircher
12 //=============================================================================
15 #ifndef SERVANT_ACTIVATOR_H
16 #define SERVANT_ACTIVATOR_H
18 #include "tao/ORB.h"
19 #include "tao/PortableServer/PortableServer.h"
20 #include "tao/PortableServer/ServantActivatorC.h"
21 #include "tao/LocalObject.h"
23 class ServantActivator :
24 public virtual PortableServer::ServantActivator,
25 public virtual ::CORBA::LocalObject
27 // = TITLE
28 // This class is used by a POA with USE_SERVANT_MANAGER and
29 // RETAIN policy.
30 public:
31 ServantActivator (CORBA::ORB_ptr orb,
32 CORBA::Object_ptr forward_to);
34 virtual PortableServer::Servant incarnate (const PortableServer::ObjectId & oid,
35 PortableServer::POA_ptr adapter);
37 virtual void etherealize (const PortableServer::ObjectId & oid,
38 PortableServer::POA_ptr adapter,
39 PortableServer::Servant serv,
40 CORBA::Boolean cleanup_in_progress,
41 CORBA::Boolean remaining_activations);
43 /// Object should be forwarded from now on.
44 void forward_requests ();
46 private:
47 CORBA::ORB_var orb_;
49 /// Location to forward to
50 CORBA::Object_var forward_to_;
53 #endif /* SERVANT_ACTIVATOR_H */