Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

SupplierAdmin.h

Go to the documentation of this file.
00001 //                            Package   : omniEvents
00002 // SupplierAdmin.h            Created   : 2003/12/04
00003 //                            Author    : Alex Tingle
00004 //
00005 //    Copyright (C) 2003 Alex Tingle.
00006 //
00007 //    This file is part of the omniEvents application.
00008 //
00009 //    omniEvents is free software; you can redistribute it and/or
00010 //    modify it under the terms of the GNU Lesser General Public
00011 //    License as published by the Free Software Foundation; either
00012 //    version 2.1 of the License, or (at your option) any later version.
00013 //
00014 //    omniEvents is distributed in the hope that it will be useful,
00015 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 //    Lesser General Public License for more details.
00018 //
00019 //    You should have received a copy of the GNU Lesser General Public
00020 //    License along with this library; if not, write to the Free Software
00021 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 class OEP_saps;
00047 
00048 namespace OmniEvents {
00049 
00050 class EventChannel_i;
00051 class ProxyPushConsumer_i;
00052 class ProxyPullConsumerManager;
00053 
00054 class SupplierAdmin_i
00055 : public POA_CosEventChannelAdmin::SupplierAdmin,
00056   public Servant
00057 {
00058 public: // CORBA interface methods
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);
00065   SupplierAdmin_i(
00066     const EventChannel_i&   channel,
00067     PortableServer::POA_ptr poa,
00068     const OEP_saps&         saps
00069   );
00070   virtual ~SupplierAdmin_i();
00071 
00073   void collect(list<CORBA::Any*>& events);
00074 
00076   void output(ostream& os);
00077 
00078 private:
00079   const EventChannel_i&     _channel;
00080   ProxyPushConsumer_i*      _pushConsumer;
00081   ProxyPullConsumerManager* _pullConsumer;
00082   list<CORBA::Any*>         _queue; 
00083 };
00084 
00085 }; // end namespace OmniEvents
00086 
00087 #endif // OMNIEVENTS__SUPPLIERADMIN_H

Generated on Fri Dec 12 10:53:03 2003 for OmniEvents by doxygen1.2.15