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
44using namespace std;
45#endif
46
47namespace OmniEvents {
48
49class EventChannel_i;
50class ProxyPushSupplierManager;
51class ProxyPullSupplierManager;
52class PersistNode;
53
55: public virtual POA_CosEventChannelAdmin::ConsumerAdmin,
56 public PortableServer::RefCountServantBase,
57 public Servant
58{
59public: // CORBA interface methods
60 CosEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier();
61 CosEventChannelAdmin::ProxyPullSupplier_ptr obtain_pull_supplier();
62
63public:
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
87private:
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
OMNIEVENTS__DEBUG_REF_COUNTS__DECL void send(CORBA::Any *event)
Queues a single event for sending to consumers.
void reincarnate(const PersistNode &node)
Populate this servant from log information.
void disconnect()
Send disconnect_XXX_consumer() to all connected consumers.
ProxyPushSupplierManager * _pushSupplier
const EventChannel_i & _channel
CosEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier()
CosEventChannelAdmin::ProxyPullSupplier_ptr obtain_pull_supplier()
void output(ostream &os)
Save this object's state to a stream.
ProxyPullSupplierManager * _pullSupplier
Servant for CosEventChannelAdmin::EventChannel objects, also inherits from omni_thread.
The EventQueue is a circular buffer, that contains _size-1 events.
Definition EventQueue.h:57
Base class for servants.
Definition Servant.h:114