00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef OMNIEVENTS__SUPPLIERADMIN_H
00025 #define OMNIEVENTS__SUPPLIERADMIN_H
00026
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030
00031 #include <list>
00032
00033 #ifdef HAVE_IOSTREAM
00034 # include <iostream>
00035 #else
00036 # include <iostream.h>
00037 #endif
00038
00039 #include "Servant.h"
00040 #include "CosEventChannelAdmin.hh"
00041
00042 #ifdef HAVE_STD_IOSTREAM
00043 using namespace std;
00044 #endif
00045
00046 namespace OmniEvents {
00047
00048 class EventChannel_i;
00049 class ProxyPushConsumer_i;
00050 class ProxyPullConsumerManager;
00051 class PersistNode;
00052
00053 class SupplierAdmin_i
00054 : public virtual POA_CosEventChannelAdmin::SupplierAdmin,
00055 public PortableServer::RefCountServantBase,
00056 public Servant
00057 {
00058 public:
00059 CosEventChannelAdmin::ProxyPushConsumer_ptr obtain_push_consumer();
00060 CosEventChannelAdmin::ProxyPullConsumer_ptr obtain_pull_consumer();
00061
00062 public:
00063 SupplierAdmin_i(const EventChannel_i& channel, PortableServer::POA_ptr poa);
00064 virtual ~SupplierAdmin_i();
00065 OMNIEVENTS__DEBUG_REF_COUNTS__DECL
00066
00068 void collect(list<CORBA::Any*>& events);
00069
00071 void disconnect();
00072
00074 void reincarnate(const PersistNode& node);
00075
00077 void output(ostream& os);
00078
00079 private:
00080 const EventChannel_i& _channel;
00081 ProxyPushConsumer_i* _pushConsumer;
00082 ProxyPullConsumerManager* _pullConsumer;
00083 list<CORBA::Any*> _queue;
00084
00087 pair<unsigned long,unsigned long> _nextPull;
00088 };
00089
00090 };
00091
00092 #endif // OMNIEVENTS__SUPPLIERADMIN_H