summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Notify_SupplierAdmin_i.h
blob: e4c7c26e49db7d33d98826ef42f2c467fdee0438 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/* -*- C++ -*- */
// $Id$
// ==========================================================================
//
// = LIBRARY
//   orbsvcs
//
// = FILENAME
//   Notify_SupplierAdmin_i.h
//
// = DESCRIPTION
//
//
// = AUTHOR
//    Pradeep Gore <pradeep@cs.wustl.edu>
//
// ==========================================================================

#ifndef NOTIFY_SUPPLIERADMIN_I_H
#define NOTIFY_SUPPLIERADMIN_I_H

#include "orbsvcs/orbsvcs/CosNotifyChannelAdminS.h"
#include "orbsvcs/orbsvcs/Notify/Notify_QoSAdmin_i.h"
#include "orbsvcs/orbsvcs/Notify/NotifyPublish_i.h"
#include "orbsvcs/orbsvcs/Notify/Notify_FilterAdmin_i.h"
#include "orbsvcs/orbsvcs/Notify/ID_Pool_T.h"
#include "ace/Hash_Map_Manager.h"

#include "ace/Auto_Ptr.h"
#include "Notify_Dispatcher.h"

class TAO_Notify_EventChannel_i;
class TAO_Notify_ProxyPushConsumer_i;

class  TAO_Notify_SupplierAdmin_i :
  public virtual POA_CosNotifyChannelAdmin::SupplierAdmin,
  public virtual TAO_Notify_QoSAdmin_i,
  public virtual TAO_NotifyPublish_i,
  public virtual TAO_Notify_FilterAdmin_i
{
  // = TITLE
  //   TAO_Notify_SupplierAdmin_i
  // = DESCRIPTION
  //
  //

public:
  TAO_Notify_SupplierAdmin_i (TAO_Notify_EventChannel_i& myChannel);
  // Constructor

  virtual ~TAO_Notify_SupplierAdmin_i (void);
  // Destructor


  void init (CORBA::Environment &ACE_TRY_ENV);
  //

  TAO_Notify_Dispatcher& get_dispatcher (void);
  //

  CosNotifyChannelAdmin::SupplierAdmin_ptr get_ref (CORBA::Environment &ACE_TRY_ENV);

  virtual CosNotifyChannelAdmin::AdminID MyID (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ));

  virtual CosNotifyChannelAdmin::EventChannel_ptr MyChannel (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ));

  virtual CosNotifyChannelAdmin::InterFilterGroupOperator MyOperator (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ));

  virtual CosNotifyChannelAdmin::ProxyIDSeq * pull_consumers (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ));

  virtual CosNotifyChannelAdmin::ProxyIDSeq * push_consumers (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ));

  virtual CosNotifyChannelAdmin::ProxyConsumer_ptr get_proxy_consumer (
    CosNotifyChannelAdmin::ProxyID proxy_id,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosNotifyChannelAdmin::ProxyNotFound
  ));

  virtual CosNotifyChannelAdmin::ProxyConsumer_ptr obtain_notification_pull_consumer (
    CosNotifyChannelAdmin::ClientType ctype,
    CosNotifyChannelAdmin::ProxyID_out proxy_id,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosNotifyChannelAdmin::AdminLimitExceeded
  ));

  virtual CosNotifyChannelAdmin::ProxyConsumer_ptr obtain_notification_push_consumer (
    CosNotifyChannelAdmin::ClientType ctype,
    CosNotifyChannelAdmin::ProxyID_out proxy_id,
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException,
    CosNotifyChannelAdmin::AdminLimitExceeded
  ));

  virtual void destroy (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ));

  // = CosEventChannelAdmin::SupplierAdmin method
virtual CosEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ));

virtual CosEventChannelAdmin::ProxyPullConsumer_ptr obtain_pull_consumer (
    CORBA::Environment &ACE_TRY_ENV
  )
  ACE_THROW_SPEC ((
    CORBA::SystemException
  ));

protected:
  CosNotifyChannelAdmin::InterFilterGroupOperator myOperator_;
  //

  TAO_Notify_EventChannel_i& myChannel_;
  // The channel to which we belong.

  CosNotifyChannelAdmin::AdminID myID_;
  // My ID.

  ID_Pool<CosNotifyChannelAdmin::ProxyID> proxy_consumer_ids;
  // Id generator for proxy suppliers.

  ACE_Hash_Map_Manager <CosNotifyChannelAdmin::ProxyID,
                                               TAO_Notify_ProxyPushConsumer_i*,
                                               ACE_SYNCH_MUTEX>
  proxypushconsumer_map_;

  auto_ptr<TAO_Notify_Dispatcher> dispatcher_;
  //
};

#endif /* NOTIFY_SUPPLIERADMIN_I_H */