00001 /** 00002 * @file CosNotification.idl 00003 * 00004 * @brief Define the CosNotification module 00005 * 00006 * CosNotification.idl,v 1.3 2002/07/01 14:13:59 parsons Exp 00007 * 00008 * @author Pradeep Gore <pradeep@cs.wustl.edu> 00009 */ 00010 00011 #ifndef _COS_NOTIFICATION_IDL_ 00012 #define _COS_NOTIFICATION_IDL_ 00013 00014 #pragma prefix "omg.org" 00015 00016 /** 00017 * @namespace CosNotification 00018 * 00019 * @brief Define basic data structures used by the Notification 00020 * Service 00021 */ 00022 module CosNotification 00023 { 00024 /// Dummy typedef for strings, if the intent was to support I18N 00025 /// strings the spec should have used wstring 00026 typedef string Istring; 00027 00028 /// Properties are named using a string 00029 typedef Istring PropertyName; 00030 00031 /// Property values are stored using anys 00032 typedef any PropertyValue; 00033 00034 /** 00035 * @struct Property 00036 * 00037 * @brief Define a name/value pair. 00038 * 00039 * Events are described using named/value sequences, this structure 00040 * defines the name/value pair. 00041 */ 00042 struct Property { 00043 /// The name 00044 PropertyName name; 00045 /// The value 00046 PropertyValue value; 00047 }; 00048 00049 /// Define a sequence of properties. 00050 typedef sequence<Property> PropertySeq; 00051 00052 //@{ 00053 /** 00054 * @name Different kinds of property sequences 00055 * 00056 * @brief The following are all sequences of Property, but 00057 * serve different purposes. 00058 */ 00059 /// Property sequence used for optional header fields 00060 typedef PropertySeq OptionalHeaderFields; 00061 00062 /// Property sequence used for the event body that can be used 00063 /// in filtering 00064 typedef PropertySeq FilterableEventBody; 00065 00066 /// Specify quality of service properties 00067 typedef PropertySeq QoSProperties; 00068 00069 /// Specify administrative properties 00070 typedef PropertySeq AdminProperties; 00071 //@} 00072 00073 /** 00074 * @struct _EventType 00075 * 00076 * @brief Define event type names. 00077 * 00078 * Different vertical industries (domains) can define well-known 00079 * events (event_types). This structure is used for that purpose 00080 */ 00081 struct _EventType { 00082 /// The name of the vertical industry defining the event type. 00083 string domain_name; 00084 /// The type of event. 00085 string type_name; 00086 }; 00087 /// A sequence of event types 00088 typedef sequence<_EventType> EventTypeSeq; 00089 00090 /** 00091 * @struct PropertyRange 00092 * 00093 * @brief A structure to define property ranges. 00094 * 00095 */ 00096 struct PropertyRange { 00097 /// Lower end of the range 00098 PropertyValue low_val; 00099 /// High end of the range 00100 PropertyValue high_val; 00101 }; 00102 00103 /** 00104 * @struct NamedPropertyRange 00105 * 00106 * @brief A named property range 00107 */ 00108 struct NamedPropertyRange { 00109 /// The name 00110 PropertyName name; 00111 /// The range 00112 PropertyRange range; 00113 }; 00114 /// A sequence of named property ranges 00115 typedef sequence<NamedPropertyRange> NamedPropertyRangeSeq; 00116 00117 /** 00118 * @enum QoSError_code 00119 * 00120 * @brief Describe QoS errors. 00121 */ 00122 enum QoSError_code { 00123 /// The application has requested an unsupported QoS property 00124 UNSUPPORTED_PROPERTY, 00125 /// The application has requested a QoS property that, though 00126 /// supported, cannot be set in the requested scope. 00127 UNAVAILABLE_PROPERTY, 00128 /// The application has requested a QoS property with an 00129 /// unsupported value. 00130 UNSUPPORTED_VALUE, 00131 /// The application has requested a QoS property with a supported 00132 /// value, but unavailable at the requeste scope. 00133 UNAVAILABLE_VALUE, 00134 /// The property name is unknown or not recognized. 00135 BAD_PROPERTY, 00136 /// The value type for the requested property is invalid 00137 BAD_TYPE, 00138 /// The value for the requested property is illegal 00139 BAD_VALUE 00140 }; 00141 00142 /** 00143 * @struct PropertyError 00144 * 00145 * @brief Describe the problems detected with an application 00146 * requested QoS. 00147 * 00148 * If there are any problems with an application request for QoS the 00149 * problems are raised using an exception that contains all the 00150 * problems, and a description of the valid values (if they apply). 00151 */ 00152 struct PropertyError { 00153 /// Property error description 00154 QoSError_code code; 00155 /// Property name with a problem 00156 PropertyName name; 00157 /// Valid range for that property in the Notification Service 00158 /// implementation 00159 PropertyRange available_range; 00160 }; 00161 /// List of property errors. 00162 typedef sequence<PropertyError> PropertyErrorSeq; 00163 00164 /** 00165 * @exception UnsupportedQoS 00166 * 00167 * @brief Exception used to describe problems with one or more QoS 00168 * requests 00169 * 00170 */ 00171 exception UnsupportedQoS { 00172 /// Complete description of the properties in error 00173 PropertyErrorSeq qos_err; 00174 }; 00175 00176 /** 00177 * @exception UnsupportedAdmin 00178 * 00179 * @brief Exception used to describe problems with one or more Admin 00180 * properties 00181 */ 00182 exception UnsupportedAdmin { 00183 /// The complete description of the invalid properties. 00184 PropertyErrorSeq admin_err; 00185 }; 00186 00187 /** 00188 * @struct FixedEventHeader 00189 * 00190 * @brief Define the 'fixed' part of the event header 00191 */ 00192 struct FixedEventHeader { 00193 /// The event type 00194 _EventType event_type; 00195 /// A (possibly unique) name for the particular event 00196 string event_name; 00197 }; 00198 00199 /** 00200 * @struct EventHeader 00201 * 00202 * @brief Complete event header 00203 */ 00204 struct EventHeader { 00205 /// The fixed part of the event header 00206 FixedEventHeader fixed_header; 00207 /// The optional part 00208 OptionalHeaderFields variable_header; 00209 }; 00210 00211 /** 00212 * @struct StructuredEvent 00213 * 00214 * @brief Define structured events 00215 */ 00216 struct StructuredEvent { 00217 /// The header 00218 EventHeader header; 00219 /// The part of the body used for filtering 00220 FilterableEventBody filterable_data; 00221 /// The part of the body not used for filtering 00222 any remainder_of_body; 00223 }; 00224 /// Sequence of events, for batch processing 00225 typedef sequence<StructuredEvent> EventBatch; 00226 00227 //@{ 00228 /** 00229 * @name Constants for QoS Properties 00230 * 00231 * The following constant declarations define the standard QoS 00232 * property names and the associated values each property can take 00233 * on. The name/value pairs for each standard property are grouped, 00234 * beginning with a string constant defined for the property name, 00235 * followed by the values the property can take on. 00236 */ 00237 00238 const string EventReliability = "EventReliability"; 00239 const short BestEffort = 0; 00240 const short Persistent = 1; 00241 00242 /// Can take on the same values as EventReliability 00243 const string ConnectionReliability = "ConnectionReliability"; 00244 00245 const string Priority = "Priority"; 00246 const short LowestPriority = -32767; 00247 const short HighestPriority = 32767; 00248 const short DefaultPriority = 0; 00249 00250 /// StartTime takes a value of type TimeBase::UtcT. 00251 const string StartTime = "StartTime"; 00252 00253 /// StopTime takes a value of type TimeBase::UtcT. 00254 const string StopTime = "StopTime"; 00255 00256 /// Timeout takes on a value of type TimeBase::TimeT 00257 const string Timeout = "Timeout"; 00258 00259 const string OrderPolicy = "OrderPolicy"; 00260 const short AnyOrder = 0; 00261 const short FifoOrder = 1; 00262 const short PriorityOrder = 2; 00263 const short DeadlineOrder = 3; 00264 00265 /// DiscardPolicy takes on the same values as OrderPolicy, plus 00266 const string DiscardPolicy = "DiscardPolicy"; 00267 const short LifoOrder = 4; 00268 00269 /// MaximumBatchSize takes on a value of type long 00270 const string MaximumBatchSize = "MaximumBatchSize"; 00271 00272 /// PacingInterval takes on a value of type TimeBase::TimeT 00273 const string PacingInterval = "PacingInterval"; 00274 00275 /// StartTimeSupported takes on a boolean value 00276 const string StartTimeSupported = "StartTimeSupported"; 00277 00278 /// StopTimeSupported takes on a boolean value 00279 const string StopTimeSupported = "StopTimeSupported"; 00280 00281 /// MaxEventsPerConsumer takes on a value of type long 00282 const string MaxEventsPerConsumer = "MaxEventsPerConsumer"; 00283 00284 //@} 00285 00286 /** 00287 * @interface QoSAdmin 00288 * 00289 * @brief Interface used to control the QoS properties of an Event 00290 * Service components (Channel, Proxy, etc.) 00291 * 00292 * QoS properties of a channel can be set at different levels, 00293 * including the proxies, the ConsumerAdmin and the SupplierAdmin 00294 * objects. Each one of those components offers this interface to 00295 * allow control over the properties. 00296 */ 00297 interface QoSAdmin { 00298 /// Get the current QoS properties 00299 /** 00300 * The operation returns the properties set: 00301 * - At the level queried 00302 * - Not set at the level queried but set at a higher-level 00303 * - Not set at all but having a default value. 00304 */ 00305 QoSProperties get_qos(); 00306 00307 /// Set the QoS properties 00308 /** 00309 * @param qos The requested QoS properties 00310 * @throws UnsupportedQoS if the requested QoS cannot be 00311 * implemented or is invalid. The exception contents describe 00312 * the problem(s) in detail. 00313 */ 00314 void set_qos ( in QoSProperties qos) 00315 raises ( UnsupportedQoS ); 00316 00317 /// Validate a set of QoS properties 00318 /** 00319 * @param required_qos the list of properties requested by the 00320 * application 00321 * @param available_qos If the properties are supported this 00322 * argument returns a list of any other properties that 00323 * could also be set. 00324 * @throws UnsupportedQoS if the requested QoS cannot be 00325 * implemented or is invalid. The exception contents describe 00326 * the problem(s) in detail. 00327 */ 00328 void validate_qos (in QoSProperties required_qos, 00329 out NamedPropertyRangeSeq available_qos ) 00330 raises ( UnsupportedQoS ); 00331 }; 00332 00333 //@{ 00334 /** 00335 * @name Constants for Admin Properties 00336 * 00337 * Admin properties are defined in similar manner as QoS 00338 * properties. The only difference is that these properties are 00339 * related to channel administration policies, as opposed message 00340 * quality of service 00341 */ 00342 /// MaxQueueLength takes on a value of type long 00343 const string MaxQueueLength = "MaxQueueLength"; 00344 00345 /// MaxConsumers takes on a value of type long 00346 const string MaxConsumers = "MaxConsumers"; 00347 00348 /// MaxSuppliers takes on a value of type long 00349 const string MaxSuppliers = "MaxSuppliers"; 00350 00351 /// RejectNewEvents takes on a value of type Boolean 00352 const string RejectNewEvents = "RejectNewEvents"; 00353 //@} 00354 00355 /** 00356 * @interface AdminPropertiesAdmin 00357 * 00358 * @brief Define the interface to manipulate the Admin properties of 00359 * a Notification Service components 00360 * 00361 * Several Notification Service components have Admin properties, 00362 * including the Event Channel, its ConsumerAdmin and SupplierAdmin 00363 * objects as well as the proxies. This interface is used to 00364 * control the Admin properties of each one of those components. 00365 */ 00366 interface AdminPropertiesAdmin { 00367 /// Get the Admin properties 00368 /** 00369 * The operation returns the properties set: 00370 * - At the level queried 00371 * - Not set at the level queried but set at a higher-level 00372 * - Not set at all but having a default value. 00373 */ 00374 AdminProperties get_admin(); 00375 00376 /// Set the Admin properities 00377 /** 00378 * @param admin The list of Admin properties requested 00379 * @throws UnsupportedAdmin if the requested admin properties 00380 * cannot be implemented or are invalid 00381 */ 00382 void set_admin (in AdminProperties admin) 00383 raises ( UnsupportedAdmin); 00384 }; 00385 00386 }; 00387 00388 #pragma prefix "" 00389 00390 #endif /* _COS_NOTIFICATION_IDL_ */