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.
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 Servant
00055 {
00056 public: // CORBA METHODS
00062   CORBA::Boolean supports(const CosLifeCycle::Key& k);
00063   CORBA::Object_ptr create_object(
00064     const CosLifeCycle::Key &k,
00065     const CosLifeCycle::Criteria &the_criteria
00066   );
00067   
00069   CORBA::Boolean is_alive() { return 1; }
00070   
00072   CosEventChannelAdmin::EventChannel_ptr create_channel(
00073     const char* channel_name
00074   );
00075 
00077   CosEventChannelAdmin::EventChannel_ptr join_channel(
00078     const char* channel_name
00079   );
00080    
00081 
00082 public:
00084   EventChannelFactory_i(const PersistNode& node);
00085 
00089   PersistNode* parseCriteria(const CosLifeCycle::Criteria& criteria) const;
00090   
00094   CosLifeCycle::Criteria extract(
00095     const char*                   name,
00096     const CosLifeCycle::Criteria& from
00097   ) const;
00098 
00099   void output(ostream& os);
00100 
00101 private:
00105   unsigned int      _port;
00106 
00110   string            _endPointNoListen;
00111 
00112   EventChannelStore _channels;
00113 };
00114 
00115 }; // namespace OmniEvents
00116 
00117 #endif // OMNIEVENTS_EVENTCHANNELFACTORY_H

Generated on Mon Jan 9 03:52:13 2006 for OmniEvents by  doxygen 1.4.6