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

EventChannelFactory.h

Go to the documentation of this file.
00001 // -*- Mode: C++; -*-
00002 //                            Package   : omniEvents
00003 // EventChannelFactory_i.h    Created   : 1/4/98
00004 //                            Author    : Paul Nader (pwn)
00005 //
00006 //    Copyright (C) 1998 Paul Nader, 2004-2005 Alex Tingle.
00007 //
00008 //    This file is part of the omniEvents application.
00009 //
00010 //    omniEvents is free software; you can redistribute it and/or
00011 //    modify it under the terms of the GNU Lesser General Public
00012 //    License as published by the Free Software Foundation; either
00013 //    version 2.1 of the License, or (at your option) any later version.
00014 //
00015 //    omniEvents is distributed in the hope that it will be useful,
00016 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 //    Lesser General Public License for more details.
00019 //
00020 //    You should have received a copy of the GNU Lesser General Public
00021 //    License along with this library; if not, write to the Free Software
00022 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 //
00024 
00025 #ifndef OMNIEVENTS_EVENTCHANNELFACTORY_H
00026 #define OMNIEVENTS_EVENTCHANNELFACTORY_H
00027 
00028 #ifdef HAVE_CONFIG_H
00029 #  include "config.h"
00030 #endif
00031 
00032 #ifdef HAVE_IOSTREAM
00033 #  include <iostream>
00034 #else
00035 #  include <iostream.h>
00036 #endif
00037 
00038 #include "omniEvents.hh"
00039 #include "Servant.h"
00040 #include "EventChannel.h"
00041 
00042 #ifdef HAVE_STD_STL
00043 using namespace std;
00044 #endif
00045 
00046 namespace OmniEvents {
00047 
00048 class PersistNode;
00049 
00050 // Event Channel Factory
00051 
00052 class EventChannelFactory_i :
00053   public virtual POA_omniEvents::EventChannelFactory,
00054   public PortableServer::RefCountServantBase,
00055   public Servant
00056 {
00057 public: // CORBA METHODS
00063   CORBA::Boolean supports(const CosLifeCycle::Key& k);
00064   CORBA::Object_ptr create_object(
00065     const CosLifeCycle::Key &k,
00066     const CosLifeCycle::Criteria &the_criteria
00067   );
00068   
00070   CORBA::Boolean is_alive() { return 1; }
00071   
00073   CosEventChannelAdmin::EventChannel_ptr create_channel(
00074     const char* channel_name
00075   );
00076 
00078   CosEventChannelAdmin::EventChannel_ptr join_channel(
00079     const char* channel_name
00080   );
00081    
00082 
00083 public:
00085   EventChannelFactory_i(const PersistNode& node);
00086   virtual ~EventChannelFactory_i();
00087 
00091   PersistNode* parseCriteria(const CosLifeCycle::Criteria& criteria) const;
00092   
00096   CosLifeCycle::Criteria extract(
00097     const char*                   name,
00098     const CosLifeCycle::Criteria& from
00099   ) const;
00100 
00101   void output(ostream& os);
00102 
00103 private:
00107   unsigned int      _port;
00108 
00112   string            _endPointNoListen;
00113 
00114   EventChannelStore _channels;
00115 };
00116 
00117 }; // namespace OmniEvents
00118 
00119 #endif // OMNIEVENTS_EVENTCHANNELFACTORY_H

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