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__CONSUMERADMIN_H
00025 #define OMNIEVENTS__CONSUMERADMIN_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 "EventQueue.h"
00041 #include "CosEventChannelAdmin.hh"
00042
00043 #ifdef HAVE_STD_IOSTREAM
00044 using namespace std;
00045 #endif
00046
00047 class OEP_caps;
00048
00049 namespace OmniEvents {
00050
00051 class EventChannel_i;
00052 class ProxyPushSupplierManager;
00053 class ProxyPullSupplierManager;
00054
00055 class ConsumerAdmin_i
00056 : public POA_CosEventChannelAdmin::ConsumerAdmin,
00057 public Servant
00058 {
00059 public:
00060 CosEventChannelAdmin::ProxyPushSupplier_ptr obtain_push_supplier();
00061 CosEventChannelAdmin::ProxyPullSupplier_ptr obtain_pull_supplier();
00062
00063 public:
00064 ConsumerAdmin_i(const EventChannel_i& channel, PortableServer::POA_ptr poa);
00065 ConsumerAdmin_i(
00066 const EventChannel_i& channel,
00067 PortableServer::POA_ptr poa,
00068 const OEP_caps& caps
00069 );
00070 virtual ~ConsumerAdmin_i();
00071
00075 void send(list<CORBA::Any*>& events);
00076
00080 static void discard(list<CORBA::Any*>& events);
00081
00083 void output(ostream& os);
00084
00085 private:
00086 EventQueue _queue;
00087 ProxyPushSupplierManager* _pushSupplier;
00088 ProxyPullSupplierManager* _pullSupplier;
00089 };
00090
00091 };
00092
00093 #endif // OMNIEVENTS__CONSUMERADMIN_H