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 Servant
00055 {
00056 public:
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 };
00116
00117 #endif // OMNIEVENTS_EVENTCHANNELFACTORY_H