summaryrefslogtreecommitdiff
path: root/TAO/tao/PortableServer/Servant_Dispatcher.h
blob: 9a4f4a76f34164d20e2ab0fe347d3c824ed3b42a (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
72
73
74
75
76
77
/* -*- C++ -*- */

//=============================================================================
/**
 *  @file    Servant_Dispatcher.h
 *
 *  $Id$
 *
 *  @author Frank Hunleth <fhunleth@cs.wustl.edu>
 */
//=============================================================================


#ifndef TAO_SERVANT_DISPATCHER_H
#define TAO_SERVANT_DISPATCHER_H
#include "ace/pre.h"

#include "ace/SString.h"
#include "portableserver_export.h"
#include "Object_Adapter.h"

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

// Forward references.
class TAO_POA_Manager;
class TAO_POA_Policy_Set;
class TAO_POA;
class ACE_Lock;
class TAO_ORB_Core;
class TAO_Service_Context;

/**
 * @class TAO_Servant_Dispatcher
 *
 * @brief Interface for POA servant dispatching strategies.
 *
 */
class TAO_PortableServer_Export TAO_Servant_Dispatcher
{
public:
  virtual ~TAO_Servant_Dispatcher (void);

  /// Pre_invoke remote request.
  virtual void pre_invoke_remote_request (TAO_POA &poa,
                                          CORBA::Short servant_priority,
                                          TAO_Service_Context &request_service_context,
                                          TAO_Service_Context &reply_service_context,
                                          TAO_Object_Adapter::Servant_Upcall::Pre_Invoke_State &pre_invoke_state
                                          ACE_ENV_ARG_DECL) = 0;

  /// Pre_invoke collocated request.
  virtual void pre_invoke_collocated_request (TAO_POA &poa,
                                              CORBA::Short servant_priority,
                                              TAO_Object_Adapter::Servant_Upcall::Pre_Invoke_State &pre_invoke_state
                                              ACE_ENV_ARG_DECL) = 0;

  /// Post_invoke request.
  virtual void post_invoke (TAO_POA &poa,
                            TAO_Object_Adapter::Servant_Upcall::Pre_Invoke_State &pre_invoke_state) = 0;

  /// Factory method for creating new POA's.
  virtual TAO_POA *create_POA (const ACE_CString &name,
                               TAO_POA_Manager &poa_manager,
                               const TAO_POA_Policy_Set &policies,
                               TAO_POA *parent,
                               ACE_Lock &lock,
                               TAO_SYNCH_MUTEX &thread_lock,
                               TAO_ORB_Core &orb_core,
                               TAO_Object_Adapter *object_adapter
                               ACE_ENV_ARG_DECL) = 0;

};

#include "ace/post.h"
#endif /* TAO_SERVANT_DISPATCHER_H */