#include <QoSProperties.h>
Inheritance diagram for TAO_Notify_QoSProperties:
Definition at line 35 of file QoSProperties.h.
anonymous enum [protected] |
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Notify_QoSProperties::TAO_Notify_QoSProperties | ( | void | ) |
Constructor.
Definition at line 16 of file QoSProperties.cpp.
References CosNotification::StartTimeSupported, and unsupported_.
00017 : event_reliability_(CosNotification::EventReliability) 00018 , connection_reliability_(CosNotification::ConnectionReliability) 00019 , priority_ (CosNotification::Priority) 00020 , timeout_ (CosNotification::Timeout) 00021 , stop_time_supported_ (CosNotification::StopTimeSupported) 00022 , maximum_batch_size_ (CosNotification::MaximumBatchSize) 00023 , pacing_interval_ (CosNotification::PacingInterval) 00024 , max_events_per_consumer_ (CosNotification::MaxEventsPerConsumer) 00025 , discard_policy_ (CosNotification::DiscardPolicy) 00026 , order_policy_ (CosNotification::OrderPolicy) 00027 , thread_pool_ (NotifyExt::ThreadPool) 00028 , thread_pool_lane_ (NotifyExt::ThreadPoolLanes) 00029 , blocking_policy_(TAO_Notify_Extensions::BlockingPolicy) 00030 { 00031 unsupported_[0] = CosNotification::StartTimeSupported; 00032 }
TAO_Notify_QoSProperties::~TAO_Notify_QoSProperties | ( | void | ) | [virtual] |
TAO_Notify_Property_Time& TAO_Notify_QoSProperties::blocking_policy | ( | void | ) |
ACE_INLINE const TAO_Notify_Property_Time & TAO_Notify_QoSProperties::blocking_policy | ( | void | ) | const |
Definition at line 89 of file QoSProperties.inl.
References blocking_policy_.
00090 { 00091 return this->blocking_policy_; 00092 }
ACE_INLINE TAO_Notify_Property_Short & TAO_Notify_QoSProperties::connection_reliability | ( | void | ) |
Definition at line 105 of file QoSProperties.inl.
References connection_reliability_.
00106 { 00107 return this->connection_reliability_; 00108 }
ACE_INLINE const TAO_Notify_Property_Short & TAO_Notify_QoSProperties::connection_reliability | ( | void | ) | const |
Definition at line 16 of file QoSProperties.inl.
References connection_reliability_.
00017 { 00018 return this->connection_reliability_; 00019 }
int TAO_Notify_QoSProperties::copy | ( | TAO_Notify_QoSProperties & | qos_properties | ) |
Populate <qos_properties> with all properties from this object. Returns -1 on error.
Definition at line 178 of file QoSProperties.cpp.
References blocking_policy_, connection_reliability_, discard_policy_, event_reliability_, max_events_per_consumer_, maximum_batch_size_, order_policy_, pacing_interval_, priority_, TAO_Notify_PropertySeq::property_map_, stop_time_supported_, and timeout_.
Referenced by TAO_Notify_Object::set_qos().
00179 { 00180 qos_properties.event_reliability_ = this->event_reliability_; 00181 qos_properties.connection_reliability_ = this->connection_reliability_; 00182 qos_properties.priority_ = this->priority_; 00183 qos_properties.timeout_ = this->timeout_; 00184 qos_properties.stop_time_supported_ = this->stop_time_supported_; 00185 qos_properties.maximum_batch_size_ = this->maximum_batch_size_; 00186 qos_properties.pacing_interval_ = this->pacing_interval_; 00187 qos_properties.max_events_per_consumer_ = this->max_events_per_consumer_; 00188 qos_properties.discard_policy_ = this->discard_policy_; 00189 qos_properties.order_policy_ = this->order_policy_; 00190 00191 qos_properties.blocking_policy_ = this->blocking_policy_; 00192 00193 PROPERTY_MAP::ITERATOR iter (this->property_map_); 00194 PROPERTY_MAP::ENTRY *entry; 00195 00196 for (; iter.next (entry); iter.advance ()) 00197 { 00198 if (qos_properties.property_map_.rebind (entry->ext_id_, entry->int_id_) == -1) 00199 return -1; 00200 } 00201 00202 return 0; 00203 }
ACE_INLINE TAO_Notify_Property_Short & TAO_Notify_QoSProperties::discard_policy | ( | void | ) |
Definition at line 151 of file QoSProperties.inl.
References discard_policy_.
00152 { 00153 return this->discard_policy_; 00154 }
ACE_INLINE const TAO_Notify_Property_Short & TAO_Notify_QoSProperties::discard_policy | ( | void | ) | const |
Definition at line 63 of file QoSProperties.inl.
References discard_policy_.
00064 { 00065 return this->discard_policy_; 00066 }
ACE_INLINE TAO_Notify_Property_Short & TAO_Notify_QoSProperties::event_reliability | ( | void | ) |
Definition at line 98 of file QoSProperties.inl.
References event_reliability_.
00099 { 00100 return this->event_reliability_; 00101 }
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE const TAO_Notify_Property_Short & TAO_Notify_QoSProperties::event_reliability | ( | void | ) | const |
Definition at line 9 of file QoSProperties.inl.
References event_reliability_.
00010 { 00011 return this->event_reliability_; 00012 }
void TAO_Notify_QoSProperties::init | ( | ) |
This version initializes the base from our members.
Definition at line 50 of file QoSProperties.cpp.
References TAO_Notify_PropertySeq::add(), blocking_policy_, connection_reliability_, discard_policy_, event_reliability_, max_events_per_consumer_, maximum_batch_size_, order_policy_, pacing_interval_, priority_, thread_pool_, thread_pool_lane_, timeout_, TAO_Notify_StructProperty_T< TYPE >::value(), and TAO_Notify_PropertyBase_T< TYPE >::value().
00051 { 00052 if (this->event_reliability_.is_valid()) 00053 { 00054 CORBA::Any a; 00055 a <<= this->event_reliability_.value(); 00056 this->add(this->event_reliability_.name(), a); 00057 } 00058 if (this->connection_reliability_.is_valid()) 00059 { 00060 CORBA::Any a; 00061 a <<= this->connection_reliability_.value(); 00062 this->add(this->connection_reliability_.name(), a); 00063 } 00064 if (this->priority_.is_valid()) 00065 { 00066 CORBA::Any a; 00067 a <<= this->priority_.value(); 00068 this->add(this->priority_.name(), a); 00069 } 00070 if (this->timeout_.is_valid()) 00071 { 00072 CORBA::Any a; 00073 a <<= this->timeout_.value(); 00074 this->add(this->timeout_.name(), a); 00075 } 00076 if (this->stop_time_supported_.is_valid()) 00077 { 00078 CORBA::Any a; 00079 a <<= CORBA::Any::from_boolean (this->stop_time_supported_.value()); 00080 this->add(this->stop_time_supported_.name(), a); 00081 } 00082 if (this->maximum_batch_size_.is_valid()) 00083 { 00084 CORBA::Any a; 00085 a <<= this->maximum_batch_size_.value(); 00086 this->add(this->maximum_batch_size_.name(), a); 00087 } 00088 if (this->pacing_interval_.is_valid()) 00089 { 00090 CORBA::Any a; 00091 a <<= this->pacing_interval_.value(); 00092 this->add(this->pacing_interval_.name(), a); 00093 } 00094 if (this->max_events_per_consumer_.is_valid()) 00095 { 00096 CORBA::Any a; 00097 a <<= this->max_events_per_consumer_.value(); 00098 this->add(this->max_events_per_consumer_.name(), a); 00099 } 00100 if (this->discard_policy_.is_valid()) 00101 { 00102 CORBA::Any a; 00103 a <<= this->discard_policy_.value(); 00104 this->add(this->discard_policy_.name(), a); 00105 } 00106 if (this->order_policy_.is_valid()) 00107 { 00108 CORBA::Any a; 00109 a <<= this->order_policy_.value(); 00110 this->add(this->order_policy_.name(), a); 00111 } 00112 00113 if (this->thread_pool_.is_valid()) 00114 { 00115 CORBA::Any a; 00116 a <<= this->thread_pool_.value(); 00117 this->add(this->thread_pool_.name(), a); 00118 } 00119 if (this->thread_pool_lane_.is_valid()) 00120 { 00121 CORBA::Any a; 00122 a <<= this->thread_pool_lane_.value(); 00123 this->add(this->thread_pool_lane_.name(), a); 00124 } 00125 if (this->blocking_policy_.is_valid()) 00126 { 00127 CORBA::Any a; 00128 a <<= this->blocking_policy_.value(); 00129 this->add(this->blocking_policy_.name(), a); 00130 } 00131 }
int TAO_Notify_QoSProperties::init | ( | const CosNotification::PropertySeq & | prop_seq, | |
CosNotification::PropertyErrorSeq & | err_seq | |||
) |
Return 0 on success, 1 if unsupported properties were detected and -1 on error.
Definition at line 134 of file QoSProperties.cpp.
References blocking_policy_, connection_reliability_, discard_policy_, ACE_String_Base< CHAR >::length(), max_events_per_consumer_, maximum_batch_size_, order_policy_, pacing_interval_, priority_, TAO_Notify_StructProperty_T< TYPE >::set(), TAO_Notify_Property_Boolean::set(), TAO_Notify_Property_T< TYPE >::set(), stop_time_supported_, CORBA::string_dup(), thread_pool_, thread_pool_lane_, timeout_, and CosNotification::UNSUPPORTED_PROPERTY.
Referenced by TAO_Notify_Object::load_attrs(), and TAO_Notify_Object::set_qos().
00135 { 00136 int err_index = -1; 00137 00138 ACE_CString name; 00139 for (CORBA::ULong i = 0; i < prop_seq.length (); ++i) 00140 { 00141 name = prop_seq[i].name.in(); 00142 00143 if (this->unsupported (name)) 00144 { 00145 err_index = err_seq.length (); 00146 err_seq.length (err_seq.length () + 1); 00147 00148 err_seq[err_index].code = CosNotification::UNSUPPORTED_PROPERTY; 00149 err_seq[err_index].name = CORBA::string_dup (prop_seq[i].name); 00150 } 00151 else if (this->property_map_.rebind (prop_seq[i].name.in (), prop_seq[i].value) == -1) 00152 return -1; 00153 // Note call to rebind. This allows to call <init> to set updates. 00154 } 00155 00156 if (prop_seq.length () > 0) 00157 { 00158 this->event_reliability_.set (*this); 00159 this->connection_reliability_.set (*this); 00160 this->priority_.set (*this); 00161 this->timeout_.set (*this); 00162 this->stop_time_supported_.set (*this); 00163 this->maximum_batch_size_.set (*this); 00164 this->pacing_interval_.set (*this); 00165 this->max_events_per_consumer_.set (*this); 00166 this->discard_policy_.set (*this); 00167 this->order_policy_.set (*this); 00168 00169 this->thread_pool_.set (*this); 00170 this->thread_pool_lane_.set (*this); 00171 this->blocking_policy_.set (*this); 00172 } 00173 00174 return err_index == -1 ? 0 : 1; 00175 }
ACE_INLINE TAO_Notify_Property_Long & TAO_Notify_QoSProperties::max_events_per_consumer | ( | void | ) |
Definition at line 144 of file QoSProperties.inl.
References max_events_per_consumer_.
00145 { 00146 return this->max_events_per_consumer_; 00147 }
ACE_INLINE const TAO_Notify_Property_Long & TAO_Notify_QoSProperties::max_events_per_consumer | ( | void | ) | const |
Definition at line 56 of file QoSProperties.inl.
References max_events_per_consumer_.
00057 { 00058 return this->max_events_per_consumer_; 00059 }
ACE_INLINE TAO_Notify_Property_Long & TAO_Notify_QoSProperties::maximum_batch_size | ( | void | ) |
Definition at line 132 of file QoSProperties.inl.
References maximum_batch_size_.
00133 { 00134 return this->maximum_batch_size_; 00135 }
ACE_INLINE const TAO_Notify_Property_Long & TAO_Notify_QoSProperties::maximum_batch_size | ( | void | ) | const |
Definition at line 43 of file QoSProperties.inl.
References maximum_batch_size_.
Referenced by TAO_Notify_Consumer::qos_changed().
00044 { 00045 return this->maximum_batch_size_; 00046 }
ACE_INLINE TAO_Notify_Property_Short & TAO_Notify_QoSProperties::order_policy | ( | void | ) |
Definition at line 158 of file QoSProperties.inl.
References order_policy_.
00159 { 00160 return this->order_policy_; 00161 }
ACE_INLINE const TAO_Notify_Property_Short & TAO_Notify_QoSProperties::order_policy | ( | void | ) | const |
Definition at line 70 of file QoSProperties.inl.
References order_policy_.
00071 { 00072 return this->order_policy_; 00073 }
ACE_INLINE TAO_Notify_Property_Time & TAO_Notify_QoSProperties::pacing_interval | ( | void | ) |
Definition at line 138 of file QoSProperties.inl.
References pacing_interval_.
00139 { 00140 return this->pacing_interval_; 00141 }
ACE_INLINE const TAO_Notify_Property_Time & TAO_Notify_QoSProperties::pacing_interval | ( | void | ) | const |
Definition at line 49 of file QoSProperties.inl.
References pacing_interval_.
00050 { 00051 return this->pacing_interval_; 00052 }
ACE_INLINE TAO_Notify_Property_Short & TAO_Notify_QoSProperties::priority | ( | void | ) |
Definition at line 112 of file QoSProperties.inl.
References priority_.
00113 { 00114 return this->priority_; 00115 }
ACE_INLINE const TAO_Notify_Property_Short & TAO_Notify_QoSProperties::priority | ( | void | ) | const |
Definition at line 23 of file QoSProperties.inl.
References priority_.
00024 { 00025 return this->priority_; 00026 }
ACE_INLINE TAO_Notify_Property_Boolean & TAO_Notify_QoSProperties::stop_time_supported | ( | void | ) |
Definition at line 126 of file QoSProperties.inl.
References stop_time_supported_.
00127 { 00128 return this->stop_time_supported_; 00129 }
ACE_INLINE const TAO_Notify_Property_Boolean & TAO_Notify_QoSProperties::stop_time_supported | ( | void | ) | const |
Definition at line 37 of file QoSProperties.inl.
References stop_time_supported_.
00038 { 00039 return this->stop_time_supported_; 00040 }
ACE_INLINE const TAO_Notify_Property_ThreadPool & TAO_Notify_QoSProperties::thread_pool | ( | void | ) | const |
= Accessors
Definition at line 76 of file QoSProperties.inl.
References thread_pool_.
Referenced by TAO_Notify_Object::set_qos().
00077 { 00078 return this->thread_pool_; 00079 }
ACE_INLINE const TAO_Notify_Property_ThreadPoolLanes & TAO_Notify_QoSProperties::thread_pool_lane | ( | void | ) | const |
Definition at line 82 of file QoSProperties.inl.
References thread_pool_lane_.
Referenced by TAO_Notify_Object::set_qos().
00083 { 00084 return this->thread_pool_lane_; 00085 }
ACE_INLINE TAO_Notify_Property_Time & TAO_Notify_QoSProperties::timeout | ( | void | ) |
Definition at line 119 of file QoSProperties.inl.
References timeout_.
00120 { 00121 return this->timeout_; 00122 }
ACE_INLINE const TAO_Notify_Property_Time & TAO_Notify_QoSProperties::timeout | ( | void | ) | const |
Definition at line 30 of file QoSProperties.inl.
References timeout_.
00031 { 00032 return this->timeout_; 00033 }
int TAO_Notify_QoSProperties::transfer | ( | TAO_Notify_QoSProperties & | qos_properties | ) |
Populate <qos_properties> with properties that can be transfered.Returns -1 on error.
Definition at line 206 of file QoSProperties.cpp.
References TAO_Notify_PropertySeq::property_map_.
Referenced by TAO_Notify_Object::initialize().
00207 { 00208 if (this->copy (qos_properties) == -1) 00209 return -1; 00210 00211 // unbind the properties that we don't want to transfer. 00212 qos_properties.property_map_.unbind (NotifyExt::ThreadPool); 00213 qos_properties.property_map_.unbind (NotifyExt::ThreadPoolLanes); 00214 00215 return 0; 00216 }
int TAO_Notify_QoSProperties::unsupported | ( | ACE_CString & | name | ) | [protected] |
Return 1 if
is unsupported.
Definition at line 39 of file QoSProperties.cpp.
References UNSUPPORTED_PROPERTY_COUNT.
00040 { 00041 for (int i = 0; i < UNSUPPORTED_PROPERTY_COUNT; ++i) 00042 { 00043 if (this->unsupported_[i] == name) 00044 return 1; 00045 } 00046 00047 return 0; 00048 }
Definition at line 109 of file QoSProperties.h.
Referenced by blocking_policy(), copy(), and init().
Definition at line 96 of file QoSProperties.h.
Referenced by connection_reliability(), copy(), and init().
= Supported standard properties
Definition at line 95 of file QoSProperties.h.
Referenced by copy(), event_reliability(), and init().
Definition at line 102 of file QoSProperties.h.
Referenced by copy(), init(), and max_events_per_consumer().
Definition at line 100 of file QoSProperties.h.
Referenced by copy(), init(), and maximum_batch_size().
Definition at line 101 of file QoSProperties.h.
Referenced by copy(), init(), and pacing_interval().
Definition at line 99 of file QoSProperties.h.
Referenced by copy(), init(), and stop_time_supported().
TAO Extensions.
Definition at line 107 of file QoSProperties.h.
Referenced by init(), and thread_pool().
ACE_CString TAO_Notify_QoSProperties::unsupported_[UNSUPPORTED_PROPERTY_COUNT] [protected] |
= Unsupported Properties.
Definition at line 92 of file QoSProperties.h.
Referenced by TAO_Notify_QoSProperties().