summaryrefslogtreecommitdiff
path: root/TAO/tao/Reactor_Registry.h
blob: be93f8d30c98ccc8e28e105ee074acede8ffa236 (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
78
79
80
81
82
83
84
// $Id$

// ============================================================================
//
// = LIBRARY
//   TAO
//
// = FILENAME
//   Reactor_Registry.h
//
// = AUTHOR
//   Carlos O'Ryan (coryan@cs.wustl.edu)
//
// ============================================================================

#ifndef TAO_REACTOR_REGISTRY_H
#define TAO_REACTOR_REGISTRY_H

#include "tao/corbafwd.h"

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

class TAO_ORB_Core;
class TAO_Leader_Follower;
class TAO_Acceptor;
class ACE_Reactor;

class TAO_Export TAO_Reactor_Registry
{
  //
  // = TITLE
  //   The interface for the concurrency strategy.
  //
  // = DESCRIPTION
  //   The ORB concurrency strategy is responsible for assigning
  //   reactors to threads, keeping the relationship between threads
  //   and their leader-follower groups and activating (if required)
  //   the server-side Svc_Handlers.
  //
public:
  TAO_Reactor_Registry (void);
  // Default constructor

  virtual ~TAO_Reactor_Registry (void);
  // The destructor

  TAO_ORB_Core *orb_core (void) const;
  // The ORB core for this concurrency strategy.

  virtual void open (TAO_ORB_Core *orb_core);
  // Initialize the Reactor Registry

  virtual ACE_Reactor *reactor (void) = 0;
  // Return the reactor for the current thread

  virtual ACE_Reactor *reactor (TAO_Acceptor *acceptor) = 0;
  // Return the reactor for a given acceptor

  virtual TAO_Leader_Follower &leader_follower (void) = 0;
  // Return the Leader-Follower group for the current thread

  virtual TAO_Leader_Follower &leader_follower (TAO_Acceptor *acceptor) = 0;
  // Return the Leader-Follower group for a given acceptor

  virtual void destroy_tss_cookie (void* cookie) = 0;
  // The strategy is allowed to store TSS resources using a
  // place-holder in the ORB_Core class. The ORB_Core the calls back
  // to do the final cleanup.

  virtual int shutdown_all (void) = 0;
  // Wakeup all the reactors

private:
  TAO_ORB_Core *orb_core_;
  // The orb_core
};

#if defined (__ACE_INLINE__)
# include "tao/Reactor_Registry.i"
#endif /* __ACE_INLINE__ */

#endif /* TAO_REACTOR_REGISTRY_H */