00001 #ifndef COS_NOTIFICATION_IDL 00002 #define COS_NOTIFICATION_IDL 00003 00014 #pragma prefix "omg.org" 00015 00016 #ifdef __TAO_IDL 00017 #define EventType _EventType 00018 #endif 00019 00020 module CosNotification 00021 { 00022 typedef string Istring; 00023 typedef Istring PropertyName; 00024 typedef any PropertyValue; 00025 00030 struct Property 00031 { 00032 PropertyName name; 00033 PropertyValue value; 00034 }; 00035 typedef sequence<Property> PropertySeq; 00036 00037 // The following are the same, but serve different purposes. 00038 00042 typedef PropertySeq OptionalHeaderFields; 00043 00047 typedef PropertySeq FilterableEventBody; 00048 00052 typedef PropertySeq QoSProperties; 00053 00057 typedef PropertySeq AdminProperties; 00058 00062 struct EventType 00063 { 00064 string domain_name; 00065 string type_name; 00066 }; 00067 00071 typedef sequence<EventType> EventTypeSeq; 00072 00077 struct PropertyRange 00078 { 00079 PropertyValue low_val; 00080 PropertyValue high_val; 00081 }; 00082 00087 struct NamedPropertyRange 00088 { 00089 PropertyName name; 00090 PropertyRange range; 00091 }; 00092 00096 typedef sequence<NamedPropertyRange> NamedPropertyRangeSeq; 00097 00101 enum QoSError_code 00102 { 00103 UNSUPPORTED_PROPERTY, 00104 UNAVAILABLE_PROPERTY, 00105 UNSUPPORTED_VALUE, 00106 UNAVAILABLE_VALUE, 00107 BAD_PROPERTY, 00108 BAD_TYPE, 00109 BAD_VALUE 00110 }; 00111 00116 struct PropertyError 00117 { 00118 QoSError_code code; 00119 PropertyName name; 00120 PropertyRange available_range; 00121 }; 00122 00126 typedef sequence<PropertyError> PropertyErrorSeq; 00127 00131 exception UnsupportedQoS { PropertyErrorSeq qos_err; }; 00132 00136 exception UnsupportedAdmin { PropertyErrorSeq admin_err; }; 00137 00138 // Define the Structured Event structure 00143 struct FixedEventHeader 00144 { 00145 EventType event_type; 00146 string event_name; 00147 }; 00148 00153 struct EventHeader 00154 { 00155 FixedEventHeader fixed_header; 00156 OptionalHeaderFields variable_header; 00157 }; 00158 00163 struct StructuredEvent 00164 { 00165 EventHeader header; 00166 FilterableEventBody filterable_data; 00167 any remainder_of_body; 00168 }; // StructuredEvent 00169 00174 typedef sequence<StructuredEvent> EventBatch; 00175 00176 // The following constant declarations define the standard 00177 // QoS property names and the associated values each property 00178 // can take on. The name/value pairs for each standard property 00179 // are grouped, beginning with a string constant defined for the 00180 // property name, followed by the values the property can take on. 00181 00182 const string EventReliability = "EventReliability"; 00183 const short BestEffort = 0; 00184 const short Persistent = 1; 00185 00186 const string ConnectionReliability = "ConnectionReliability"; 00187 // Can take on the same values as EventReliability 00188 00189 const string Priority = "Priority"; 00190 const short LowestPriority = -32767; 00191 const short HighestPriority = 32767; 00192 const short DefaultPriority = 0; 00193 00194 const string StartTime = "StartTime"; 00195 // StartTime takes a value of type TimeBase::UtcT. 00196 00197 const string StopTime = "StopTime"; 00198 // StopTime takes a value of type TimeBase::UtcT. 00199 00200 const string Timeout = "Timeout"; 00201 // Timeout takes on a value of type TimeBase::TimeT 00202 00203 const string OrderPolicy = "OrderPolicy"; 00204 const short AnyOrder = 0; 00205 const short FifoOrder = 1; 00206 const short PriorityOrder = 2; 00207 const short DeadlineOrder = 3; 00208 00209 const string DiscardPolicy = "DiscardPolicy"; 00210 // DiscardPolicy takes on the same values as OrderPolicy, plus 00211 const short LifoOrder = 4; 00212 00213 const string MaximumBatchSize = "MaximumBatchSize"; 00214 // MaximumBatchSize takes on a value of type long 00215 00216 const string PacingInterval = "PacingInterval"; 00217 // PacingInterval takes on a value of type TimeBase::TimeT 00218 00219 const string StartTimeSupported = "StartTimeSupported"; 00220 // StartTimeSupported takes on a boolean value 00221 00222 const string StopTimeSupported = "StopTimeSupported"; 00223 // StopTimeSupported takes on a boolean value 00224 00225 const string MaxEventsPerConsumer = "MaxEventsPerConsumer"; 00226 // MaxQueueLength takes on a value of type long 00227 00231 interface QoSAdmin 00232 { 00238 QoSProperties get_qos(); 00239 00246 void set_qos ( in QoSProperties qos) 00247 raises ( UnsupportedQoS ); 00248 00258 void validate_qos ( 00259 in QoSProperties required_qos, 00260 out NamedPropertyRangeSeq available_qos ) 00261 raises ( UnsupportedQoS ); 00262 00263 }; // QosAdmin 00264 00265 // Admin properties are defined in similar manner as QoS 00266 // properties. The only difference is that these properties 00267 // are related to channel administration policies, as opposed 00268 // message quality of service 00269 00270 const string MaxQueueLength = "MaxQueueLength"; 00271 // MaxQueueLength takes on a value of type long 00272 00273 const string MaxConsumers = "MaxConsumers"; 00274 // MaxConsumers takes on a value of type long 00275 00276 const string MaxSuppliers = "MaxSuppliers"; 00277 // MaxSuppliers takes on a value of type long 00278 00279 const string RejectNewEvents = "RejectNewEvents"; 00280 // RejectNewEvents takes on a value of type boolean 00281 00285 interface AdminPropertiesAdmin 00286 { 00292 AdminProperties get_admin(); 00293 00301 void set_admin (in AdminProperties admin) 00302 raises ( UnsupportedAdmin ); 00303 00304 }; // AdminPropertiesAdmin 00305 00306 }; // CosNotification 00307 00308 #endif /* COS_NOTIFICATION_IDL */
![]()