OmniEvents
ConsumerAdmin.h
Go to the documentation of this file.
1 // Package : omniEvents
2 // src/ConsumerAdmin.h Created : 2003/12/04
3 // Author : Alex Tingle
4 //
5 // Copyright (C) 2003-2005 Alex Tingle.
6 //
7 // This file is part of the omniEvents application.
8 //
9 // omniEvents is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // omniEvents is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 //
23 
24 #ifndef OMNIEVENTS__CONSUMERADMIN_H
25 #define OMNIEVENTS__CONSUMERADMIN_H
26 
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30 
31 #include <list>
32 
33 #ifdef HAVE_IOSTREAM
34 # include <iostream>
35 #else
36 # include <iostream.h>
37 #endif
38 
39 #include "Servant.h"
40 #include "EventQueue.h"
41 #include "CosEventChannelAdmin.hh"
42 
43 #ifdef HAVE_STD_IOSTREAM
44 using namespace std;
45 #endif
46 
47 namespace OmniEvents {
48 
49 class EventChannel_i;
50 class ProxyPushSupplierManager;
51 class ProxyPullSupplierManager;
52 class PersistNode;
53 
55 : public virtual POA_CosEventChannelAdmin::ConsumerAdmin,
56  public PortableServer::RefCountServantBase,
57  public Servant
58 {
59 public: // CORBA interface methods
60  CosEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier();
61  CosEventChannelAdmin::ProxyPullSupplier_ptr obtain_pull_supplier();
62 
63 public:
64  ConsumerAdmin_i(const EventChannel_i& channel, PortableServer::POA_ptr poa);
65  virtual ~ConsumerAdmin_i();
67 
71  void send(CORBA::Any* event);
72 
76  void send(list<CORBA::Any*>& events);
77 
79  void disconnect();
80 
82  void reincarnate(const PersistNode& node);
83 
85  void output(ostream& os);
86 
87 private:
92 };
93 
94 }; // end namespace OmniEvents
95 
96 #endif // OMNIEVENTS__CONSUMERADMIN_H
#define OMNIEVENTS__DEBUG_REF_COUNTS__DECL
Declares debug versions of _add/remove_ref().
Definition: Servant.h:68
ProxyPushSupplierManager * _pushSupplier
Definition: ConsumerAdmin.h:90
const EventChannel_i & _channel
Definition: ConsumerAdmin.h:88
ProxyPullSupplierManager * _pullSupplier
Definition: ConsumerAdmin.h:91
Servant for CosEventChannelAdmin::EventChannel objects, also inherits from omni_thread.
Definition: EventChannel.h:115
The EventQueue is a circular buffer, that contains _size-1 events.
Definition: EventQueue.h:57
Base class for servants.
Definition: Servant.h:114