OmniEvents
SupplierAdmin.h
Go to the documentation of this file.
1// Package : omniEvents
2// SupplierAdmin.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__SUPPLIERADMIN_H
25#define OMNIEVENTS__SUPPLIERADMIN_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 "CosEventChannelAdmin.hh"
41
42#ifdef HAVE_STD_IOSTREAM
43using namespace std;
44#endif
45
46namespace OmniEvents {
47
48class EventChannel_i;
49class ProxyPushConsumer_i;
50class ProxyPullConsumerManager;
51class PersistNode;
52
54: public virtual POA_CosEventChannelAdmin::SupplierAdmin,
55 public PortableServer::RefCountServantBase,
56 public Servant
57{
58public: // CORBA interface methods
59 CosEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer();
60 CosEventChannelAdmin::ProxyPullConsumer_ptr obtain_pull_consumer();
61
62public:
63 SupplierAdmin_i(const EventChannel_i& channel, PortableServer::POA_ptr poa);
64 virtual ~SupplierAdmin_i();
66
69
71 void disconnect();
72
74 void reincarnate(const PersistNode& node);
75
77 void output(ostream& os);
78
79private:
84
88};
89
90}; // end namespace OmniEvents
91
92#endif // OMNIEVENTS__SUPPLIERADMIN_H
#define OMNIEVENTS__DEBUG_REF_COUNTS__DECL
Declares debug versions of _add/remove_ref().
Definition Servant.h:68
T::_ptr_type createNarrowedReference(PortableServer::POA_ptr poa, const char *repositoryId)
Helper method that creates a new CORBA object and then narrows it to the appropriate type.
Definition Servant.h:96
Servant for CosEventChannelAdmin::EventChannel objects, also inherits from omni_thread.
Default servant for ProxyPushConsumer objects.
Base class for servants.
Definition Servant.h:114
list< CORBA::Any * > _queue
Incoming queue for the PushConsumer.
pair< unsigned long, unsigned long > _nextPull
Next time to retry pull (sec,nsec).
CosEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer()
const EventChannel_i & _channel
void disconnect()
Send disconnect_XXX_supplier() to all connected consumers.
void output(ostream &os)
Save this object's state to a stream.
ProxyPushConsumer_i * _pushConsumer
ProxyPullConsumerManager * _pullConsumer
OMNIEVENTS__DEBUG_REF_COUNTS__DECL void collect(list< CORBA::Any * > &events)
Collects all events that have arrived since the last call.
void reincarnate(const PersistNode &node)
Populate this servant from log information.
CosEventChannelAdmin::ProxyPullConsumer_ptr obtain_pull_consumer()