00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
00051
00052 class EventChannelFactory_i :
00053 public virtual POA_omniEvents::EventChannelFactory,
00054 public PortableServer::RefCountServantBase,
00055 public Servant
00056 {
00057 public:
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 };
00118
00119 #endif // OMNIEVENTS_EVENTCHANNELFACTORY_H