Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ConsumerAdmin.h

Go to the documentation of this file.
00001 //                            Package   : omniEvents
00002 // src/ConsumerAdmin.h        Created   : 2003/12/04
00003 //                            Author    : Alex Tingle
00004 //
00005 //    Copyright (C) 2003-2005 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__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 namespace OmniEvents {
00048 
00049 class EventChannel_i;
00050 class ProxyPushSupplierManager;
00051 class ProxyPullSupplierManager;
00052 class PersistNode;
00053 
00054 class ConsumerAdmin_i
00055 : public virtual POA_CosEventChannelAdmin::ConsumerAdmin,
00056   public PortableServer::RefCountServantBase,
00057   public Servant
00058 {
00059 public: // CORBA interface methods
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   virtual ~ConsumerAdmin_i();
00066   OMNIEVENTS__DEBUG_REF_COUNTS__DECL
00067 
00071   void send(CORBA::Any* event);
00072 
00076   void send(list<CORBA::Any*>& events);
00077 
00079   void disconnect();
00080 
00082   void reincarnate(const PersistNode& node);
00083 
00085   void output(ostream& os);
00086 
00087 private:
00088   const EventChannel_i&     _channel;
00089   EventQueue                _queue;
00090   ProxyPushSupplierManager* _pushSupplier;
00091   ProxyPullSupplierManager* _pullSupplier;
00092 };
00093 
00094 }; // end namespace OmniEvents
00095 
00096 #endif // OMNIEVENTS__CONSUMERADMIN_H

Generated on Fri Aug 26 20:56:13 2005 for OmniEvents by  doxygen 1.4.3-20050530