1 karl 1.79 //%2006////////////////////////////////////////////////////////////////////////
|
2 kumpf 1.1 //
|
3 karl 1.63 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.47 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.63 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.65 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.79 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 kumpf 1.1 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 kumpf 1.27 //
|
21 kumpf 1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_IndicationService_h
35 #define Pegasus_IndicationService_h
36
37 #include <Pegasus/Common/Config.h>
38 #include <Pegasus/Common/MessageQueueService.h>
39 #include <Pegasus/Common/CIMMessage.h>
|
40 kumpf 1.78 #include <Pegasus/Common/AcceptLanguageList.h>
41 #include <Pegasus/Common/ContentLanguageList.h>
|
42 kumpf 1.83.4.2 #include <Pegasus/Server/ProviderRegistrationManager/\
43 ProviderRegistrationManager.h>
|
44 kumpf 1.54 #include <Pegasus/Server/Linkage.h>
|
45 chuck 1.64 #include <Pegasus/Query/QueryExpression/QueryExpression.h>
|
46 kumpf 1.1
|
47 kumpf 1.83.4.2 #include <Pegasus/IndicationService/ProviderClassList.h>
48 #include <Pegasus/IndicationService/IndicationOperationAggregate.h>
49
50 #ifdef PEGASUS_ENABLE_INDICATION_COUNT
51 # include <Pegasus/IndicationService/ProviderIndicationCountTable.h>
52 #endif
|
53 kumpf 1.41
|
54 kumpf 1.1 PEGASUS_NAMESPACE_BEGIN
55
|
56 kumpf 1.54 class SubscriptionRepository;
57 class SubscriptionTable;
|
58 kumpf 1.1
59 /**
|
60 kumpf 1.5 IndicationService class is the service that serves the
|
61 kumpf 1.10 Indication Subscription, Indication Filter, and Indication Handler
|
62 kumpf 1.5 classes, and processes indications.
|
63 kumpf 1.1 */
64
65 class PEGASUS_SERVER_LINKAGE IndicationService : public MessageQueueService
66 {
67 public:
68
69 /**
70 Constructs an IndicationSubscription instance and initializes instance
71 variables.
72 */
|
73 kumpf 1.82 IndicationService(
74 CIMRepository* repository,
75 ProviderRegistrationManager* providerRegManager);
|
76 kumpf 1.1
|
77 kumpf 1.82 virtual ~IndicationService();
|
78 kumpf 1.1
|
79 mday 1.2 void handleEnqueue(Message* message);
|
80 kumpf 1.1
|
81 kumpf 1.82 virtual void handleEnqueue();
|
82 kumpf 1.1
|
83 kumpf 1.82 virtual void _handle_async_request(AsyncRequest* req);
|
84 kumpf 1.1
|
85 kumpf 1.54 /**
86 Gets a String containing the Provider Name, for use in a log message to
87 identify the provider.
88
89 @param provider provider instance
90
91 @return String containing the Provider Name
92 */
|
93 kumpf 1.82 static String getProviderLogString(CIMInstance& provider);
|
94 kumpf 1.54
|
95 kumpf 1.1 AtomicInt dienow;
96
97 /**
|
98 kumpf 1.5 Operation types for the NotifyProviderRegistration message
|
99 kumpf 1.1 */
|
100 kumpf 1.5 enum Operation {OP_CREATE = 1, OP_DELETE = 2, OP_MODIFY = 3};
|
101 kumpf 1.24
102 static Mutex _mutex;
|
103 kumpf 1.1
|
104 kumpf 1.5 private:
|
105 kumpf 1.1
|
106 kumpf 1.82 void _initialize();
|
107 kumpf 1.1
|
108 kumpf 1.82 void _terminate();
|
109 kumpf 1.1
|
110 kumpf 1.82 void _handleGetInstanceRequest(const Message* message);
|
111 kumpf 1.1
|
112 kumpf 1.82 void _handleEnumerateInstancesRequest(const Message* message);
|
113 kumpf 1.1
|
114 kumpf 1.82 void _handleEnumerateInstanceNamesRequest(const Message* message);
|
115 kumpf 1.1
|
116 kumpf 1.82 void _handleCreateInstanceRequest(const Message* message);
|
117 kumpf 1.1
|
118 kumpf 1.82 void _handleModifyInstanceRequest(const Message* message);
|
119 kumpf 1.1
120 void _handleDeleteInstanceRequest(const Message * message);
121
|
122 yi.zhou 1.83 void _handleProcessIndicationRequest(Message* message);
|
123 kumpf 1.1
124 /**
|
125 kumpf 1.57 Asynchronous callback function for _handleProcessIndicationRequest.
126 The response from the Handler is checked, and if it is not success, the
|
127 carolann.graves 1.74 subscription's On Fatal Error Policy is implemented.
|
128 kumpf 1.57
129 @param operation shared data structure that controls message
130 processing
131 @param destination target queue of completion callback
132 @param userParameter user parameter for callback processing
133 */
|
134 kumpf 1.82 static void _handleIndicationCallBack(
135 AsyncOpNode* operation,
136 MessageQueue* destination,
137 void* userParameter);
|
138 kumpf 1.57
139 /**
|
140 kumpf 1.82 Notifies the Indication Service that a change in provider registration
141 has occurred. The Indication Service retrieves the subscriptions
142 affected by the registration change, sends the appropriate Create,
|
143 carolann.graves 1.74 Modify, and/or Delete requests to the provider, and sends an alert to
144 handler instances of subscriptions that are no longer served by the
|
145 kumpf 1.10 provider.
|
146 kumpf 1.1 */
|
147 kumpf 1.82 void _handleNotifyProviderRegistrationRequest(const Message* message);
|
148 kumpf 1.1
149 /**
|
150 carolann.graves 1.74 Notifies the Indication Service that a provider has been disabled.
|
151 kumpf 1.51 The Indication Service retrieves the subscriptions served by the
|
152 carolann.graves 1.74 disabled provider, and logs a message for each subscription that is no
|
153 kumpf 1.51 longer served by the provider.
|
154 kumpf 1.1 */
|
155 kumpf 1.82 void _handleNotifyProviderTerminationRequest(const Message* message);
|
156 kumpf 1.1
157 /**
|
158 carolann.graves 1.74 Notifies the Indication Service that a provider has been enabled.
159 The Indication Service retrieves the subscriptions that can be served
160 by the enabled provider, sends Create Subscription and Enable
161 Indications requests to the provider, and logs a message for each
|
162 kumpf 1.51 subscription that is now served by the provider.
163 */
|
164 kumpf 1.82 void _handleNotifyProviderEnableRequest(const Message* message);
|
165 kumpf 1.51
166 /**
|
167 carolann.graves 1.80 Notifies the Indication Service that failure of a provider module that
168 included at least one indication provider has been detected.
169 The Indication Service retrieves the subscriptions served by providers
170 in the failed module. The Indication Service returns in the response
171 the number of affected subscriptions, so the sender of the request
172 knows if any subscriptions were affected.
173 */
|
174 kumpf 1.82 void _handleNotifyProviderFailRequest(Message* message);
|
175 carolann.graves 1.80
176 /**
|
177 carolann.graves 1.74 Determines if it is legal to create an instance.
178 Checks for existence of all key and required properties. Checks that
179 properties that MUST NOT exist (based on values of other properties),
180 do not exist. For any property that has a default value, if it does
|
181 kumpf 1.5 not exist, adds the property with the default value.
182
183 @param instance instance to be created
184 @param nameSpace namespace for instance to be created
185
|
186 carolann.graves 1.73 @exception CIM_ERR_INVALID_PARAMETER if instance is invalid
|
187 carolann.graves 1.74 @exception CIM_ERR_NOT_SUPPORTED if the specified class is not
|
188 carolann.graves 1.73 supported
|
189 kumpf 1.5
|
190 kumpf 1.54 @return True, if the instance can be created;
|
191 kumpf 1.10 Otherwise throws an exception
|
192 kumpf 1.5 */
|
193 kumpf 1.82 Boolean _canCreate(
194 CIMInstance& instance,
195 const CIMNamespaceName& nameSpace);
|
196 kumpf 1.5
|
197 kumpf 1.21 /**
198 Validates the specified required property in the instance.
|
199 carolann.graves 1.74 If the property does not exist, or has a null value, or is not of the
|
200 kumpf 1.56 expected type, an exception is thrown, using the specified message.
|
201 kumpf 1.21
|
202 carolann.graves 1.74 This function is called by the _canCreate function, and is used to
|
203 kumpf 1.21 validate the Filter and Handler properties in Subscription instances,
|
204 carolann.graves 1.74 the Name, Query and Query Language properties in
205 Filter instances, the Name and Destination
206 properties in CIMXML Handler instances, and the Name,
|
207 kumpf 1.21 Trap Destination, and SNMP Version properties in SNMP Mapper instances.
208
209 @param instance instance to be validated
210 @param propertyName name of property to be validated
|
211 kumpf 1.56 @param expectedType expected CIMType of property value
|
212 kumpf 1.21 @param message message to be used in exception
|
213 kumpf 1.82 @param isArray indicates whether the validated
214 property is array
|
215 kumpf 1.21
|
216 carolann.graves 1.73 @exception CIM_ERR_INVALID_PARAMETER if required property is missing
217 or null
|
218 kumpf 1.21 */
|
219 kumpf 1.82 void _checkRequiredProperty(
220 CIMInstance& instance,
221 const CIMName& propertyName,
|
222 kumpf 1.56 const CIMType expectedType,
|
223 kumpf 1.82 const String& message,
224 const Boolean isArray = false);
|
225 kumpf 1.20
|
226 kumpf 1.5 /**
|
227 carolann.graves 1.74 Validates the specified Uint16 (non-array) property and its
|
228 carolann.graves 1.69 corresponding String (non-array) Other___ property in the instance.
|
229 kumpf 1.15 If the property does not exist, it is added with the default value.
230 If the property exists, but its value is NULL, its value is set to
231 the default value.
232 If the value of the property is Other, but the corresponding Other___
|
233 kumpf 1.56 property either does not exist, has a value of NULL, or is not of the
|
234 carolann.graves 1.74 correct type, an exception is thrown.
|
235 kumpf 1.15 If the value of the property is not Other, but the corresponding
236 Other___ property exists and has a non-NULL value, an exception is
237 thrown.
|
238 carolann.graves 1.74 If the value of the property is not a supported value, an exception is
|
239 kumpf 1.56 thrown.
|
240 carolann.graves 1.74 This function is called by the _canCreate function, and is used to
241 validate the following pairs of properties in Subscription or Handler
242 instances: Subscription State, Other Subscription State, Repeat
243 Notification Policy, Other Repeat Notification Policy, On Fatal Error
244 Policy, Other On Fatal Error Policy, Persistence Type, Other
|
245 kumpf 1.15 Persistence Type.
246
247 @param instance instance to be validated
248 @param propertyName name of property to be validated
249 @param otherPropertyName name of Other___ property to be validated
250 @param defaultValue default value for property
251 @param otherValue "Other" value for property
|
252 kumpf 1.19 @param validValues set of valid values for property
|
253 kumpf 1.55 @param supportedValues set of supported values for property
|
254 kumpf 1.15
|
255 carolann.graves 1.73 @exception CIM_ERR_INVALID_PARAMETER if value of property or Other___
256 property is invalid
|
257 kumpf 1.15 */
|
258 kumpf 1.82 void _checkPropertyWithOther(
259 CIMInstance& instance,
260 const CIMName& propertyName,
261 const CIMName& otherPropertyName,
|
262 kumpf 1.15 const Uint16 defaultValue,
|
263 kumpf 1.19 const Uint16 otherValue,
|
264 kumpf 1.82 const Array<Uint16>& validValues,
265 const Array<Uint16>& supportedValues);
|
266 kumpf 1.20
|
267 kumpf 1.21 /**
268 Validates the specified property in the instance.
269 If the property does not exist, it is added with the default value.
270 If the property exists, but its value is NULL, its value is set to
271 the default value.
|
272 carolann.graves 1.74 This function is called by the _canCreate function, and is used to
|
273 carolann.graves 1.62 validate the Source Namespace property in Filter instances.
|
274 carolann.graves 1.74 This function is also called by the _initOrValidateStringProperty
275 function to validate the CreationClassName, SystemName, and
|
276 carolann.graves 1.69 SystemCreationClassName key properties in Filter and Handler instances.
|
277 kumpf 1.21
|
278 kumpf 1.56 Note: currently all properties validated by this function are of type
|
279 carolann.graves 1.74 String. To use this function in the future with properties of other
280 types, a type parameter would need to be added, and the default value
|
281 kumpf 1.56 would need to be passed as a CIMValue instead of a String.
282
|
283 carolann.graves 1.69 Note: currently all properties validated by this function are non-array
284 properties. To use this function in the future with both array and
|
285 carolann.graves 1.74 non-array properties, a Boolean isArray parameter would need to be
|
286 carolann.graves 1.69 added.
287
|
288 kumpf 1.21 @param instance instance to be validated
289 @param propertyName name of property to be validated
290 @param defaultValue default value for property
291
292 @return the value of the property
293 */
|
294 kumpf 1.82 String _checkPropertyWithDefault(
295 CIMInstance& instance,
296 const CIMName& propertyName,
297 const String& defaultValue);
|
298 kumpf 1.56
299 /**
300 Validates the specified property in the instance.
|
301 carolann.graves 1.62 If the property does not exist, it is added with the default value.
302 If the property exists, but its value is NULL, its value is set to
303 the default value.
|
304 carolann.graves 1.74 If the property exists and has a non-NULL value, its value is validated
305 against the default (expected) value. If the value is invalid, an
|
306 carolann.graves 1.62 exception is thrown.
|
307 carolann.graves 1.74 This function is called by the _canCreate function, and is used to
|
308 carolann.graves 1.62 validate the Creation Class Name, System Name and System Creation Class
309 Name properties in Filter and Handler instances.
310
311 Note: currently all properties validated by this function are of type
|
312 carolann.graves 1.74 String. To use this function in the future with properties of other
313 types, a type parameter would need to be added, and the default value
|
314 carolann.graves 1.62 would need to be passed as a CIMValue instead of a String.
315
|
316 carolann.graves 1.69 Note: currently all properties validated by this function are non-array
317 properties. To use this function in the future with both array and
|
318 carolann.graves 1.74 non-array properties, a Boolean isArray parameter would need to be
|
319 carolann.graves 1.69 added.
320
|
321 carolann.graves 1.62 @param instance instance to be validated
322 @param propertyName name of property to be validated
323 @param defaultValue default value for property
324
325 @return the value of the property
326 */
|
327 kumpf 1.82 String _initOrValidateStringProperty(
328 CIMInstance& instance,
329 const CIMName& propertyName,
330 const String& defaultValue);
|
331 carolann.graves 1.62
332 /**
333 Validates the specified property in the instance.
|
334 kumpf 1.56 If the property exists and its value is not NULL, but it is not of
335 the correct type, an exception is thrown.
|
336 carolann.graves 1.74 This function is called by the _canCreate function. It is used to
337 validate the FailureTriggerTimeInterval, TimeOfLastStateChange,
|
338 kumpf 1.56 SubscriptionDuration, SubscriptionStartTime, SubscriptionTimeRemaining,
339 RepeatNotificationInterval, RepeatNotificationGap, and
340 RepeatNotificationCount properties in Subscription instances, the Owner
|
341 carolann.graves 1.74 property in Handler instances, and the PortNumber, SNMPSecurityName,
|
342 kumpf 1.56 and SNMPEngineID properties in SNMP Mapper Handler instances.
343
|
344 carolann.graves 1.69 Note: currently all properties validated by this function are non-array
345 properties. To use this function in the future with both array and
|
346 carolann.graves 1.74 non-array properties, a Boolean isArray parameter would need to be
|
347 carolann.graves 1.69 added.
348
|
349 kumpf 1.56 @param instance instance to be validated
350 @param propertyName name of property to be validated
351 @param expectedType expected CIMType for property
|
352 yi.zhou 1.75 @param isArray indicates whether the validated
353 property is array
|
354 kumpf 1.56
|
355 carolann.graves 1.73 @exception CIM_ERR_INVALID_PARAMETER if property exists and is not
356 null but is not of the correct
357 type
|
358 kumpf 1.56 */
|
359 kumpf 1.82 void _checkProperty(
360 CIMInstance& instance,
361 const CIMName& propertyName,
|
362 yi.zhou 1.75 const CIMType expectedType,
363 const Boolean isArray = false);
|
364 kumpf 1.15
365 /**
|
366 carolann.graves 1.76 Validates that all properties in the instance are supported properties,
367 and throws an exception if an unknown, unsupported property is found.
368
369 @param instance instance to be validated
370
371 @exception CIM_ERR_NOT_SUPPORTED if instance includes an unknown,
372 unsupported property
373 */
|
374 kumpf 1.82 void _checkSupportedProperties(
375 const CIMInstance& instance);
|
376 carolann.graves 1.76
377 /**
|
378 kumpf 1.82 Validates value of the specified Uint16 property in the instance.
379 If the value of the property is not a valid value, or is not a
|
380 yi.zhou 1.77 supported value, an exception is thrown.
381
382 @param instance instance to be validated
383 @param propertyName name of property to be validated
384 @param validValues set of valid values for property
385 @param supportedValues set of supported values for property
|
386 kumpf 1.82
387 @exception CIM_ERR_NOT_SUPPORTED if the property value is not
|
388 yi.zhou 1.77 supported
|
389 kumpf 1.82 CIM_ERR_INVALID_PARAMETER if the property value is not
|
390 yi.zhou 1.77 valid
391 */
|
392 kumpf 1.82 void _checkValue(
393 const CIMInstance& instance,
394 const CIMName& propertyName,
395 const Array<Uint16>& validValues,
396 const Array<Uint16>& supportedValues);
|
397 yi.zhou 1.77
398 /**
|
399 kumpf 1.10 Determines if the user is authorized to modify the instance, and if the
|
400 carolann.graves 1.74 specified modification is supported. Currently, the only modification
401 supported is of the Subscription State property of the Subscription
|
402 kumpf 1.10 class.
|
403 kumpf 1.5
404 @param request modification request
405 @param instance instance to be modified
|
406 kumpf 1.37 @param modifiedInstance modified instance
|
407 kumpf 1.5
|
408 carolann.graves 1.73 @exception CIM_ERR_NOT_SUPPORTED if the specified modification is
409 not supported
410 @exception CIM_ERR_ACCESS_DENIED if the user is not authorized to
411 modify the instance
412 @exception CIM_ERR_INVALID_PARAMETER if the modifiedInstance is
413 invalid
|
414 kumpf 1.5
|
415 kumpf 1.54 @return True, if the instance can be modified;
|
416 kumpf 1.10 Otherwise throws an exception
|
417 kumpf 1.5 */
|
418 kumpf 1.82 Boolean _canModify(
419 const CIMModifyInstanceRequestMessage* request,
420 const CIMObjectPath& instanceReference,
421 const CIMInstance& instance,
422 CIMInstance& modifiedInstance);
|
423 kumpf 1.5
424 /**
|
425 carolann.graves 1.74 Determines if the user is authorized to delete the instance, and if it
426 is legal to delete the instance. If authorized, Subscription instances
427 may always be deleted. Filter and non-transient Handler instances may
428 only be deleted if they are not being referenced by any Subscription
429 instances. If the instance to be deleted is a transient Handler, any
|
430 kumpf 1.10 referencing Subscriptions are also deleted.
|
431 kumpf 1.5
432 @param instanceReference reference for instance to be deleted
433 @param nameSpace namespace for instance to be deleted
|
434 kumpf 1.10 @param currentUser current user
435
|
436 carolann.graves 1.73 @exception CIM_ERR_ACCESS_DENIED if the user is not authorized to
437 delete the instance
438 @exception CIM_ERR_FAILED if the instance to be deleted is
439 referenced by a subscription
|
440 kumpf 1.5
|
441 kumpf 1.54 @return True, if the instance can be deleted;
|
442 kumpf 1.10 Otherwise throws an exception
|
443 kumpf 1.1 */
|
444 kumpf 1.82 Boolean _canDelete(
445 const CIMObjectPath& instanceReference,
446 const CIMNamespaceName& nameSpace,
447 const String& currentUser);
|
448 kumpf 1.1
449 /**
450 Retrieves list of enabled subscription instances in all namespaces,
451 where the subscription indication class matches or is a superclass
|
452 kumpf 1.10 of the supported class, and the properties required to process the
453 subscription are all contained in the list of supported properties.
|
454 carolann.graves 1.74 If the checkProvider parameter value is True, a subscription is only
455 included in the list returned if the specified provider accepted the
456 subscription. If the checkProvider parameter value is False, the
|
457 kumpf 1.42 provider parameter is not used (ignored).
|
458 kumpf 1.1
|
459 kumpf 1.10 @param supportedClass the supported class
460 @param nameSpaces the list of supported namespaces
461 @param supportedProperties the list of supported properties
|
462 kumpf 1.42 @param checkProvider indicates whether provider acceptance is
463 checked
464 @param provider the provider (used if checkProvider True)
|
465 kumpf 1.1
|
466 kumpf 1.26 @return list of CIMInstance subscriptions
|
467 kumpf 1.1 */
|
468 kumpf 1.82 Array<CIMInstance> _getMatchingSubscriptions(
469 const CIMName& supportedClass,
470 const Array<CIMNamespaceName> nameSpaces,
471 const CIMPropertyList& supportedProperties,
|
472 kumpf 1.43 const Boolean checkProvider = false,
|
473 kumpf 1.82 const CIMInstance& provider = CIMInstance());
|
474 kumpf 1.1
475 /**
476 Retrieves lists of enabled subscription instances in all namespaces
477 that are either newly supported or previously supported, based on the
|
478 kumpf 1.9 supported class, the supported namespaces before and after modification,
|
479 carolann.graves 1.74 and the supported properties before and after modification. For
480 subscriptions based on the supported class, the newSubscriptions list
481 returned contains the subscriptions for which the properties required
482 to process the subscription are all contained in the new list of
483 supported properties, but are not all contained in the old list of
|
484 kumpf 1.9 supported properties, and/or the filter source namespace is contained in
|
485 carolann.graves 1.74 the new list if supported namespaces, but is not contained in the old
486 list of supported namespaces. The formerSubscriptions list returned
|
487 kumpf 1.9 contains the subscriptions for which the properties required to process
|
488 carolann.graves 1.74 the subscription are not all contained in the new list of supported
489 properties, but are all contained in the old list of supported
490 properties, and/or the filter source namespace is not contained in the
491 new list if supported namespaces, but is contained in the old list of
|
492 kumpf 1.9 supported namespaces.
493
|
494 kumpf 1.10 @param supportedClass the supported class
|
495 kumpf 1.9 @param newNameSpaces namespaces supported after modification
496 @param oldNameSpaces namespaces supported before modification
497 @param newProperties properties supported after modification
498 @param oldProperties properties supported before modification
|
499 kumpf 1.1 @param newSubscriptions the list of newly supported subscriptions
500 @param formerSubscriptions the list of previously supported
501 subscriptions
502 */
|
503 kumpf 1.82 void _getModifiedSubscriptions(
504 const CIMName& supportedClass,
505 const Array<CIMNamespaceName>& newNameSpaces,
506 const Array<CIMNamespaceName>& oldNameSpaces,
507 const CIMPropertyList& newProperties,
508 const CIMPropertyList& oldProperties,
509 Array<CIMInstance>& newSubscriptions,
510 Array<CIMInstance>& formerSubscriptions);
|
511 kumpf 1.1
512 /**
|
513 kumpf 1.9 Determines if all of the required properties in the specified list
514 are contained in the specified list of supported properties.
515
516 @param requiredProperties the required properties
|
517 kumpf 1.10 @param supportedProperties the supported properties
|
518 kumpf 1.9
|
519 kumpf 1.54 @return true, if all required properties are supported;
|
520 kumpf 1.9 false otherwise
521 */
|
522 kumpf 1.82 Boolean _inPropertyList(
523 const CIMPropertyList& requiredProperties,
524 const CIMPropertyList& supportedProperties);
|
525 kumpf 1.9
526 /**
|
527 chuck 1.64 Builds a QueryExpression from the filter query string,
528 the query language name, and the namespace in which the query
529 is to be run.
|
530 kumpf 1.1
531 @param filterQuery the filter query string
|
532 chuck 1.64 @param queryLanguage the query language name
533 @param ns query namespace
|
534 kumpf 1.1
|
535 chuck 1.64 @return QueryExpression representing the filter query
|
536 kumpf 1.1 */
|
537 kumpf 1.82 QueryExpression _getQueryExpression(
538 const String& filterQuery,
539 const String& queryLanguage,
540 const CIMNamespaceName& ns) const;
|
541 kumpf 1.1
542 /**
|
543 chuck 1.64 Extracts the indication class name from the specified query expression
544 (WQL or CQL), and validates that the name represents a subclass of the
|
545 kumpf 1.1 Indication class.
546
|
547 chuck 1.64 @param queryExpression the query expression
|
548 kumpf 1.1 @param nameSpaceName the namespace
549
550 @return String containing the indication class name
551 */
|
552 kumpf 1.82 CIMName _getIndicationClassName(
553 const QueryExpression& queryExpression,
554 const CIMNamespaceName& nameSpaceName) const;
|
555 kumpf 1.15
556 /**
|
557 kumpf 1.1 Retrieves the list of indication providers that serve the specified
558 indication subclasses.
559
|
560 chuck 1.64 @param queryExpression the query expression
561 @param nameSpace the namespace name
|
562 kumpf 1.1 @param indicationClassName the indication class name
563 @param indicationSubclasses the list of indication subclass names
564
565 @return list of ProviderClassList structs
566 */
|
567 kumpf 1.82 Array<ProviderClassList> _getIndicationProviders(
568 const QueryExpression& queryExpression,
569 const CIMNamespaceName& nameSpace,
570 const CIMName& indicationClassName,
571 const Array<CIMName>& indicationSubclasses) const;
|
572 kumpf 1.1
573 /**
|
574 carolann.graves 1.74 Retrieves the list of required properties (all the properties
575 referenced in the WHERE clause) for the specified filter query
|
576 carolann.graves 1.72 expression.
|
577 kumpf 1.1
|
578 chuck 1.64 @param queryExpression the query expression
|
579 kumpf 1.22 @param nameSpaceName the namespace
|
580 chuck 1.64 @param indicationClassName the indication class name
|
581 kumpf 1.1
|
582 carolann.graves 1.74 @return CIMPropertyList of required properties for the filter query
|
583 chuck 1.64 expression
|
584 kumpf 1.1 */
|
585 kumpf 1.82 CIMPropertyList _getPropertyList(
586 const QueryExpression& queryExpression,
587 const CIMNamespaceName& nameSpaceName,
588 const CIMName& indicationClassName) const;
|
589 kumpf 1.22
590 /**
|
591 carolann.graves 1.74 Checks if the property list includes all properties in the specified
|
592 kumpf 1.22 class. If so, a NULL CIMPropertyList is returned. Otherwise, a
|
593 carolann.graves 1.74 CIMPropertyList containing the properties is returned. The list of
594 property names in the specified indication class is also returned in
595 the indicationClassProperties parameter.
|
596 carolann.graves 1.60
597 @param propertyList the list of property names
598 @param nameSpaceName the namespace
599 @param indicationClassName the indication class name
600 @param indicationClassProperties the list of property names in the
601 specified indication class
|
602 kumpf 1.22
|
603 carolann.graves 1.74 @return CIMPropertyList of properties referenced by the filter query
|
604 kumpf 1.22 select statement
605 */
|
606 kumpf 1.82 CIMPropertyList _checkPropertyList(
607 const Array<CIMName>& propertyList,
608 const CIMNamespaceName& nameSpaceName,
609 const CIMName& indicationClassName,
610 Array<CIMName>& indicationClassProperties) const;
|
611 kumpf 1.1
612 /**
613 Extracts the condition (WHERE Clause) from the specified filter query
614 string.
615
616 @param filterQuery the filter query
617
618 @return String containing the filter query condition
619 */
|
620 kumpf 1.82 String _getCondition(
621 const String& filterQuery) const;
|
622 kumpf 1.1
623 /**
|
624 carolann.graves 1.74 Deletes subscriptions referencing the specified handler. All namespaces
625 are searched for subscriptions that reference the handler to be deleted.
|
626 kumpf 1.4
|
627 carolann.graves 1.74 @param nameSpace the name space of the handler being
628 deleted
|
629 kumpf 1.4 @param referenceProperty the name of the reference property in the
630 subscription instance
631 @param handler the handler reference
632 */
|
633 kumpf 1.82 void _deleteReferencingSubscriptions(
634 const CIMNamespaceName& nameSpace,
635 const CIMName& referenceProperty,
636 const CIMObjectPath& handler);
|
637 kumpf 1.4
638 /**
639 Determines if specified Subscription has expired
640
641 NOTE: It is assumed that the instance passed to this function is a
642 Subscription instance, and that the Subscription Duration and
643 Start Time properties exist
644
645 @param instance the subscription instance
646
|
647 kumpf 1.54 @return True, if the Subscription has expired;
|
648 kumpf 1.4 False otherwise
649 */
|
650 kumpf 1.82 Boolean _isExpired(
651 const CIMInstance& instance) const;
|
652 kumpf 1.4
653 /**
|
654 carolann.graves 1.74 Deletes specified subscription
|
655 kumpf 1.5
656 @param subscription the subscription reference
657 */
|
658 kumpf 1.82 void _deleteExpiredSubscription(
659 CIMObjectPath& subscription);
|
660 kumpf 1.21
661 /**
662 Gets the Subscription Time Remaining property
663
|
664 carolann.graves 1.74 Calculates time remaining from Subscription Start Time, Subscription
|
665 kumpf 1.21 Duration, and current date time. If the subscription has a non-null
|
666 carolann.graves 1.74 Duration, the Time Remaining is set, and True is returned. If the
667 subscription does not have a non-null Duration, it has no expiration
668 date, and the time remaining is unlimited. In this case, the Time
|
669 kumpf 1.21 Remaining is not set and False is returned.
|
670 carolann.graves 1.74
|
671 kumpf 1.21 NOTE: It is assumed that the instance passed to this function is a
|
672 carolann.graves 1.74 Subscription instance, and that the Start Time property exists and
|
673 kumpf 1.21 has a value
674
675 @param instance Input the subscription instance
676 @param timeRemaining Output the time remaining (seconds)
677
|
678 kumpf 1.54 @return True, if the subscription has a non-null Duration;
|
679 kumpf 1.21 False otherwise
680 */
|
681 kumpf 1.82 Boolean _getTimeRemaining(
682 const CIMInstance& instance,
683 Uint64& timeRemaining) const;
|
684 kumpf 1.5
685 /**
|
686 kumpf 1.4 Sets the Subscription Time Remaining property
687
|
688 carolann.graves 1.74 Calculates time remaining from Subscription Start Time, Subscription
|
689 kumpf 1.4 Duration, and current date time
|
690 carolann.graves 1.74
|
691 kumpf 1.4 NOTE: It is assumed that the instance passed to this function is a
692 Subscription instance, and that the Subscription Duration and
693 Start Time properties exist
694
695 @param instance the subscription instance
696 */
|
697 kumpf 1.82 void _setTimeRemaining(CIMInstance& instance);
|
698 kumpf 1.4
699 /**
|
700 kumpf 1.23 Gets the parameter values required to Create or Modify the subscription
|
701 kumpf 1.10 request.
|
702 carolann.graves 1.74 If no indication providers are found, condition and queryLanguage are
|
703 kumpf 1.3 set to empty string.
704
|
705 kumpf 1.33 @param subscriptionInstance Input subscription instance
|
706 carolann.graves 1.74 @param indicationSubclasses Output list of subclasses of indication
|
707 kumpf 1.33 class in filter query
|
708 kumpf 1.3 @param indicationProviders Output list of providers with associated
709 classes
710 @param propertyList Output list of properties required by the
711 subscription
|
712 kumpf 1.17 @param sourceNameSpace Output source namespace for filter query
|
713 kumpf 1.3 @param condition Output condition part of the filter query
|
714 kumpf 1.58 @param query Output filter query
|
715 kumpf 1.3 @param queryLanguage Output query language in which the filter
716 query is expressed
717 */
|
718 kumpf 1.82 void _getCreateParams(
719 const CIMInstance& subscriptionInstance,
720 Array<CIMName>& indicationSubclasses,
721 Array<ProviderClassList>& indicationProviders,
722 CIMPropertyList& propertyList,
723 CIMNamespaceName& sourceNameSpace,
724 String& condition,
725 String& query,
726 String& queryLanguage);
|
727 kumpf 1.10
728 /**
|
729 kumpf 1.23 Gets the parameter values required to Create or Modify the subscription
|
730 kumpf 1.10 request.
731
|
732 kumpf 1.33 @param subscriptionInstance Input subscription instance
|
733 carolann.graves 1.74 @param indicationSubclasses Output list of subclasses of indication
|
734 kumpf 1.33 class in filter query
|
735 kumpf 1.10 @param propertyList Output list of properties required by the
736 subscription
|
737 kumpf 1.17 @param sourceNameSpace Output source namespace for filter query
|
738 kumpf 1.10 @param condition Output condition part of the filter query
|
739 kumpf 1.58 @param query Output filter query
|
740 kumpf 1.10 @param queryLanguage Output query language in which the filter
741 query is expressed
742 */
|
743 kumpf 1.82 void _getCreateParams(
744 const CIMInstance& subscriptionInstance,
745 Array<CIMName>& indicationSubclasses,
746 CIMPropertyList& propertyList,
747 CIMNamespaceName& sourceNameSpace,
748 String& condition,
749 String& query,
750 String& queryLanguage);
|
751 kumpf 1.3
752 /**
|
753 kumpf 1.23 Gets the parameter values required to Delete the subscription request.
|
754 kumpf 1.5
|
755 kumpf 1.33 @param subscriptionInstance Input subscription instance
|
756 carolann.graves 1.74 @param indicationSubclasses Output list of subclasses of indication
|
757 kumpf 1.33 class in filter query
758 @param sourceNameSpace Output source namespace for filter query
|
759 kumpf 1.5
|
760 kumpf 1.23 @return List of providers with associated classes to Delete
|
761 kumpf 1.5 */
|
762 kumpf 1.82 Array<ProviderClassList> _getDeleteParams(
763 const CIMInstance& subscriptionInstance,
764 Array<CIMName>& indicationSubclasses,
765 CIMNamespaceName& sourceNameSpace);
|
766 mday 1.13
|
767 kumpf 1.5 /**
|
768 kumpf 1.23 Sends Create subscription request for the specified subscription
|
769 carolann.graves 1.68 to each provider in the list. The requests are sent using SendAsync,
|
770 carolann.graves 1.74 and the responses are aggregated in the callback methods. Create
771 Subscription requests are sent to the indication providers using
772 SendAsync in the following cases: (1) on creation of an enabled
773 subscription instance, and (2) on modification of a subscription
774 instance, when the state changes to enabled. In cases (1) and (2),
775 there is an original Create Instance or Modify Instance request to
|
776 carolann.graves 1.71 which the Indication Service must respond.
|
777 kumpf 1.1
778 @param indicationProviders list of providers with associated classes
|
779 kumpf 1.54 @param nameSpace the nameSpace name of the resource being
|
780 carolann.graves 1.74 monitored, from the SourceNamespace
781 property of the CIM_IndicationFilter
782 instance for the specified
|
783 kumpf 1.54 subscription
|
784 kumpf 1.1 @param propertyList the properties referenced by the
785 subscription
786 @param condition the condition part of the filter query
|
787 kumpf 1.58 @param query the filter query
|
788 kumpf 1.1 @param queryLanguage the query language in which the filter
789 query is expressed
|
790 kumpf 1.23 @param subscription the subscription to be created
|
791 chuck 1.35 @param acceptLangs the language of the response, and
792 future indications
793 @param contentLangs the language of the subscription
|
794 carolann.graves 1.71 @param origRequest the original request (Create
|
795 carolann.graves 1.68 Instance, Modify Instance)
|
796 carolann.graves 1.74 @param indicationSubclasses the indication subclasses for the
|
797 kumpf 1.41 subscription
|
798 kumpf 1.9 @param userName the userName for authentication
799 @param authType the authentication type
800
|
801 kumpf 1.1 */
|
802 kumpf 1.82 void _sendAsyncCreateRequests(
803 const Array<ProviderClassList>& indicationProviders,
804 const CIMNamespaceName& nameSpace,
805 const CIMPropertyList& propertyList,
806 const String& condition,
807 const String& query,
808 const String& queryLanguage,
809 const CIMInstance& subscription,
810 const AcceptLanguageList& acceptLangs,
811 const ContentLanguageList& contentLangs,
|
812 kumpf 1.41 const CIMRequestMessage * origRequest,
|
813 kumpf 1.82 const Array<CIMName>& indicationSubclasses,
814 const String& userName,
815 const String& authType = String::EMPTY);
|
816 mday 1.13
|
817 kumpf 1.1 /**
|
818 carolann.graves 1.68 Sends Create subscription request for the specified subscription
819 to each provider in the list. The requests are sent using SendWait,
820 so no callback methods are required. Create Subscription requests are
821 sent to the indication providers using SendWait in the following cases:
|
822 carolann.graves 1.74 (1) on notification of a provider registration change newly enabling
823 the provider to serve the subscription, (2) on notification that a
824 provider has been enabled and may now serve the subscription, and
|
825 carolann.graves 1.71 (3) on initialization, for each enabled subscription retrieved from the
826 repository. In cases (1) and (2), there is an original Notify Provider
|
827 carolann.graves 1.74 Registration or Notify Provider Enable request to which the Indication
|
828 carolann.graves 1.71 Service must respond. In case (3), there is no original request and no
829 response is required.
|
830 carolann.graves 1.68
831 @param indicationProviders list of providers with associated classes
832 @param nameSpace the nameSpace name of the resource being
833 monitored, from the SourceNamespace
834 property of the CIM_IndicationFilter
835 instance for the specified
836 subscription
837 @param propertyList the properties referenced by the
838 subscription
839 @param condition the condition part of the filter query
840 @param query the filter query
841 @param queryLanguage the query language in which the filter
842 query is expressed
843 @param subscription the subscription to be created
844 @param acceptLangs the language of the response, and
845 future indications
846 @param contentLangs the language of the subscription
847 @param userName the userName for authentication
848 @param authType the authentication type
849
|
850 carolann.graves 1.71 @return List of providers that accepted subscription
|
851 carolann.graves 1.68 */
|
852 kumpf 1.82 Array<ProviderClassList> _sendWaitCreateRequests(
853 const Array<ProviderClassList>& indicationProviders,
854 const CIMNamespaceName& nameSpace,
855 const CIMPropertyList& propertyList,
856 const String& condition,
857 const String& query,
858 const String& queryLanguage,
859 const CIMInstance& subscription,
860 const AcceptLanguageList& acceptLangs,
861 const ContentLanguageList& contentLangs,
862 const String& userName,
863 const String& authType = String::EMPTY);
|
864 carolann.graves 1.68
865 /**
|
866 kumpf 1.23 Sends Modify subscription request for the specified subscription
|
867 carolann.graves 1.68 to each provider in the list. The requests are sent using SendWait,
868 so no callback methods are required. Modify Subscription requests must
|
869 carolann.graves 1.74 be sent to the indication providers on notification of a provider
870 registration change, when the provider was formerly serving the
871 subscription, and is still serving the subscription, in the following
872 cases: (1) the provider is newly serving an additional indication
|
873 carolann.graves 1.68 subclass specified by the subscription, or (2) the provider is
|
874 carolann.graves 1.74 no longer serving an indication subclass specified by the subscription
|
875 kumpf 1.41 (but is still serving at least one of the indication subclasses).
|
876 carolann.graves 1.68 In cases (1) and (2), there is an original Notify Provider Registration
877 request to which the Indication Service must respond.
|
878 kumpf 1.1
879 @param indicationProviders list of providers with associated classes
|
880 kumpf 1.54 @param nameSpace the nameSpace name of the resource being
881 monitored, from the SourceNamespace
882 property of the CIM_IndicationFilter
|
883 carolann.graves 1.74 instance for the specified
884 subscription
|
885 kumpf 1.1 @param propertyList the properties referenced by the
886 subscription
887 @param condition the condition part of the filter query
|
888 kumpf 1.58 @param query the filter query
|
889 kumpf 1.1 @param queryLanguage the query language in which the filter
890 query is expressed
891 @param subscription the subscription to be modified
|
892 chuck 1.35 @param acceptLangs the language of the response, and
893 future indications
|
894 carolann.graves 1.74 @param contentLangs the language of the subscription
|
895 kumpf 1.9 @param userName the userName for authentication
896 @param authType the authentication type
|
897 kumpf 1.1 */
|
898 kumpf 1.82 void _sendWaitModifyRequests(
899 const Array<ProviderClassList>& indicationProviders,
900 const CIMNamespaceName& nameSpace,
901 const CIMPropertyList& propertyList,
902 const String& condition,
903 const String& query,
904 const String& queryLanguage,
905 const CIMInstance& subscription,
906 const AcceptLanguageList& acceptLangs,
907 const ContentLanguageList& contentLangs,
908 const String& userName,
909 const String& authType = String::EMPTY);
|
910 kumpf 1.1
911 /**
|
912 kumpf 1.23 Sends Delete subscription request for the specified subscription
|
913 carolann.graves 1.68 to each provider in the list. The requests are sent using SendAsync,
|
914 carolann.graves 1.74 and the responses are aggregated in the callback methods. Delete
915 Subscription requests are sent to the indication providers using
916 SendAsync in the following cases: (1) on deletion of an enabled
917 subscription instance, (2) on modification of a subscription instance,
918 when the state changes to disabled, (3) on deletion of an expired
919 subscription, and (4) on deletion of a subscription referencing a
920 deleted transient handler. In cases (1) and (2), there is an original
921 Delete Instance or Modify Instance request to which the Indication
|
922 carolann.graves 1.68 Service must respond. In cases (3) and (4), there is no orginal request
923 and no response is required.
|
924 kumpf 1.1
925 @param indicationProviders list of providers with associated classes
|
926 carolann.graves 1.74 @param nameSpace the nameSpace name of the resource being
|
927 kumpf 1.54 monitored, from the SourceNamespace
928 property of the CIM_IndicationFilter
|
929 carolann.graves 1.74 instance for the specified
930 subscription
|
931 kumpf 1.1 @param subscription the subscription to be modified
|
932 chuck 1.35 @param acceptLangs the language of the response
|
933 carolann.graves 1.74 @param contentLangs the language of the subscription
934 @param origRequest the original request (Delete Instance,
|
935 carolann.graves 1.68 Modify Instance)
|
936 carolann.graves 1.74 @param indicationSubclasses the indication subclasses for the
|
937 kumpf 1.41 subscription
|
938 kumpf 1.9 @param userName the userName for authentication
939 @param authType the authentication type
|
940 kumpf 1.1 */
|
941 kumpf 1.82 void _sendAsyncDeleteRequests(
942 const Array<ProviderClassList>& indicationProviders,
943 const CIMNamespaceName& nameSpace,
944 const CIMInstance& subscription,
945 const AcceptLanguageList& acceptLangs,
946 const ContentLanguageList& contentLangs,
|
947 kumpf 1.41 const CIMRequestMessage * origRequest,
|
948 kumpf 1.82 const Array<CIMName>& indicationSubclasses,
949 const String& userName,
950 const String& authType = String::EMPTY);
|
951 kumpf 1.1
952 /**
|
953 carolann.graves 1.68 Sends Delete subscription request for the specified subscription
954 to each provider in the list. The requests are sent using SendWait,
955 so no callback methods are required. Delete Subscription requests are
|
956 carolann.graves 1.74 sent to the indication providers using SendWait in the following case:
957 (1) on notification of a provider registration change newly preventing
958 the provider from serving the subscription. In case (1), there is an
959 original Notify Provider Registration request to which the Indication
960 Service must respond.
|
961 carolann.graves 1.68
962 @param indicationProviders list of providers with associated classes
963 @param nameSpace the nameSpace name of the resource being
964 monitored, from the SourceNamespace
965 property of the CIM_IndicationFilter
966 instance for the specified
967 subscription
968 @param subscription the subscription to be modified
969 @param acceptLangs the language of the response
970 @param contentLangs the language of the subscription
971 @param userName the userName for authentication
972 @param authType the authentication type
973 */
|
974 kumpf 1.82 void _sendWaitDeleteRequests(
975 const Array<ProviderClassList>& indicationProviders,
976 const CIMNamespaceName& nameSpace,
977 const CIMInstance& subscription,
978 const AcceptLanguageList& acceptLangs,
979 const ContentLanguageList& contentLangs,
980 const String& userName,
981 const String& authType = String::EMPTY);
|
982 carolann.graves 1.68
983 /**
|
984 kumpf 1.41 Collects responses from providers for aggregation as they are received,
|
985 carolann.graves 1.74 and stores them in the IndicationOperationAggregate instance. Calls
986 _handleOperationResponseAggregation to process the responses, once all
|
987 kumpf 1.41 expected responses have been received.
988
|
989 kumpf 1.57 @param operation shared data structure that controls message
|
990 kumpf 1.41 processing
991 @param destination target queue of completion callback
992 @param userParameter user parameter for callback processing
993 */
|
994 kumpf 1.82 static void _aggregationCallBack(
|
995 kumpf 1.41 AsyncOpNode * operation,
996 MessageQueue * destination,
997 void * userParameter);
998
999 /**
|
1000 carolann.graves 1.74 Calls the appropriate function to processes responses from providers,
|
1001 kumpf 1.41 based on the type of request sent to providers, once all responses have
|
1002 carolann.graves 1.74 been received.
|
1003 kumpf 1.41
|
1004 carolann.graves 1.74 @param operationAggregate the operation aggregate instance
|
1005 kumpf 1.41 */
|
1006 kumpf 1.82 void _handleOperationResponseAggregation(
|
1007 kumpf 1.41 IndicationOperationAggregate * operationAggregate);
1008
1009 /**
|
1010 carolann.graves 1.74 Processes create subscription responses from providers, once all have
1011 been received. Takes the appropriate action, based on the type of the
1012 original request, if any, and the responses received. Sends the
|
1013 kumpf 1.41 response to the original request, if required.
1014
|
1015 carolann.graves 1.74 @param operationAggregate the operation aggregate instance
|
1016 kumpf 1.41 */
|
1017 kumpf 1.82 void _handleCreateResponseAggregation(
|
1018 kumpf 1.41 IndicationOperationAggregate * operationAggregate);
1019
1020 /**
|
1021 carolann.graves 1.74 Processes modify subscription responses from providers, once all have
|
1022 kumpf 1.41 been received. Updates the subscription hash tables.
1023
|
1024 carolann.graves 1.74 @param operationAggregate the operation aggregate instance
|
1025 kumpf 1.41 */
|
1026 kumpf 1.82 void _handleModifyResponseAggregation(
|
1027 kumpf 1.41 IndicationOperationAggregate * operationAggregate);
1028
1029 /**
|
1030 carolann.graves 1.74 Processes delete subscription responses from providers, once all have
1031 been received. Updates the subscription hash tables appropriately,
1032 based on the type of the original request, if any. Sends the response
|
1033 kumpf 1.41 to the original request, if required.
1034
|
1035 carolann.graves 1.74 @param operationAggregate the operation aggregate instance
|
1036 kumpf 1.41 */
|
1037 kumpf 1.82 void _handleDeleteResponseAggregation(
|
1038 kumpf 1.41 IndicationOperationAggregate * operationAggregate);
1039
1040 /**
|
1041 kumpf 1.1 Creates an alert instance of the specified class.
1042
1043 @param alertClassName the alert class name
|
1044 kumpf 1.7 @param subscriptions subscriptions for which alert is to be
|
1045 kumpf 1.1 created
1046
1047 @return the created alert instance
1048 */
|
1049 kumpf 1.82 CIMInstance _createAlertInstance(
1050 const CIMName& alertClassName,
1051 const Array<CIMInstance>& subscriptions);
|
1052 mday 1.14
|
1053 kumpf 1.40 #if 0
|
1054 kumpf 1.82 /**
1055 Asynchronous completion routine for _sendAlerts
1056 */
1057
1058 static void _sendAlertsCallBack(
1059 AsyncOpNode* operation,
1060 MessageQueue* callback_destination,
1061 void* parameter);
|
1062 kumpf 1.1
1063 /**
1064 Sends specified alert to each unique handler instance for the
1065 specified subscriptions in the list.
1066
|
1067 kumpf 1.7 @param subscriptions subscriptions for which alert is to be
|
1068 kumpf 1.1 sent
1069 @param alertInstance the alert to be sent
1070 */
|
1071 kumpf 1.82 void _sendAlerts(
1072 const Array<CIMInstance>& subscriptions,
1073 /* const */ CIMInstance& alertInstance);
|
1074 kumpf 1.40 #endif
|
1075 carolann.graves 1.74
|
1076 kumpf 1.16 /**
|
1077 carolann.graves 1.74 Sends a Subscription Init Complete request to the Provider
|
1078 carolann.graves 1.67 Manager Service.
1079 */
|
1080 kumpf 1.82 void _sendSubscriptionInitComplete();
|
1081 kumpf 1.16
|
1082 kumpf 1.37 /**
1083 Gets the value of the Creator property from the specified Subscription
|
1084 carolann.graves 1.74 instance. If this function returns False, the value of the creator
|
1085 kumpf 1.37 parameter is unchanged.
1086
1087 @param instance subscription instance
1088 @param creator value of Creator property if retrieved
1089
|
1090 kumpf 1.54 @return True, if the value of the Creator property was retrieved;
|
1091 kumpf 1.37 False if Creator property was missing, null, or of an
|
1092 kumpf 1.54 incorrect type
|
1093 kumpf 1.37 */
|
1094 kumpf 1.82 Boolean _getCreator(
1095 const CIMInstance& instance,
1096 String& creator) const;
|
1097 kumpf 1.37
1098 /**
|
1099 kumpf 1.54 Validates the specified SubscriptionState property value.
|
1100 kumpf 1.37
|
1101 kumpf 1.54 @param state SubscriptionState property value
|
1102 kumpf 1.37
|
1103 kumpf 1.54 @return True, if the SubscriptionState property value is valid;
1104 False otherwise
|
1105 kumpf 1.37 */
|
1106 kumpf 1.82 Boolean _validateState(
|
1107 kumpf 1.54 const Uint16 state) const;
|
1108 kumpf 1.37
|
1109 kumpf 1.46 /**
1110 This function peforms an authorization test based on the
1111 value of the enableSubscriptionForNonprivilegedUsers.
1112
1113 @param userName String
1114
|
1115 carolann.graves 1.74 @return True, if authentication is not enabled or the
|
1116 kumpf 1.54 user is a privileged system user;
1117 False, if authentication is enabled and the
1118 user is not privileged
|
1119 kumpf 1.46 */
|
1120 kumpf 1.82 void _checkNonprivilegedAuthorization(
1121 const String& userName);
|
1122 kumpf 1.46
|
1123 kumpf 1.48 /**
|
1124 kumpf 1.49 Updates the propertyList, in preparation for calling the Repository.
|
1125 carolann.graves 1.74 If the propertyList is not null, the Creator property must be added to
1126 the list. Also, if the request is for the Subscription class, the
1127 value of the Time Remaining property need only be calculated if it is
1128 requested. In that case, the Subscription Duration and Start Time
1129 properties must be added to the list if not already there.
|
1130 kumpf 1.49
1131 @param className class name for the request
1132 @param propertyList list of properties requested
1133 @param setTimeRemaining indicates whether Time Remaining property
1134 was requested
1135 @param startTimeAdded indicates whether Start Time property was
1136 added to the list
1137 @param durationAdded indicates whether Duration property was
1138 added to the list
1139 */
|
1140 kumpf 1.82 void _updatePropertyList(
1141 CIMName& className,
1142 CIMPropertyList& propertyList,
1143 Boolean& setTimeRemaining,
1144 Boolean& startTimeAdded,
1145 Boolean& durationAdded);
|
1146 kumpf 1.49
1147 /**
|
1148 carolann.graves 1.74 Gets a String containing the comma-separated Subscription Filter Name
|
1149 kumpf 1.48 and Handler Name, for use in a log message to identify the subscription.
1150
1151 @param subscription subscription instance
1152
1153 @return String containing the comma-separated Subscription Filter Name
1154 and Handler Name
1155 */
|
1156 kumpf 1.82 String _getSubscriptionLogString(CIMInstance& subscription);
|
1157 kumpf 1.48
|
1158 yi.zhou 1.83 /**
1159 Retrieves list of enabled subscription instances based on the class
1160 name and namespace of the generated indication. If the subscription
1161 matches the class name and namespace of the generated indication
1162 and the provider who generated this indication accepted this
1163 subscription, the subscription is added to the initial subscriptions
1164 list.
1165 If the indication provider included subscriptions in the
1166 SubscriptionInstanceNamesContainer, the subset of subscriptions
1167 specified by the indication provider that also appear in the initial
1168 subscriptions list is returned.
1169 Any subscription included by the provider but not containing in the
1170 initial subscriptions list is ignored.
1171
1172 @param providedSubscriptionNames Subscriptions specified by the
1173 indication provider
1174 @param className The generated indication class
1175 name
1176 @param nameSpace The generated indication namespace
1177 @param indicationProvider The provider which generated
1178 the indication
|
1179 kumpf 1.83.4.3 @param subscriptions Output Array of subscription
1180 instances
1181 @param subscriptionKeys Output Array of keys associated
1182 with the subscriptions
|
1183 yi.zhou 1.83 */
|
1184 kumpf 1.83.4.3 void _getRelevantSubscriptions(
|
1185 yi.zhou 1.83 const Array<CIMObjectPath> & providedSubscriptionNames,
1186 const CIMName& className,
1187 const CIMNamespaceName& nameSpace,
|
1188 kumpf 1.83.4.3 const CIMInstance& indicationProvider,
1189 Array<CIMInstance>& subscriptions,
1190 Array<String>& subscriptionKeys);
|
1191 yi.zhou 1.83
1192 /**
1193 Evaluate if the specified subscription matches the indication based on:
1194 1) Whether the properties (in WHERE clause) from filter query are
1195 supported by the indication provider;
1196 2) Whether the subscripton is expired;
1197 3) Whether the filter criteria are met by the generated indication
1198
1199 @param subscription The subscription to be evaluated
1200 @param indication The generated indication
1201 @param supportedPropertyList The properties are supported by the
1202 indication provider
1203 @param queryExpr The query expression of the evaluated
1204 subscription which is used for
1205 indication evaluation
1206 @param sourceNameSpace The source namespace of the filter
1207 instance
1208
1209 @return True, if the subscription is met all above conditions;
1210 False otherwise
1211 */
1212 yi.zhou 1.83 Boolean _subscriptionMatch(
1213 const CIMInstance& subscription,
1214 const CIMInstance& indication,
1215 const CIMPropertyList& supportedPropertyList,
1216 QueryExpression& queryExpr,
1217 const CIMNamespaceName sourceNameSpace);
1218
1219 /**
1220 Format the generated indication based on:
1221 1) Use QueryExpression::applyProjection to remove properties not
1222 listed in the SELECT clause;
1223 2) Remove any properties that may be left on the indication
1224 that are not in the indication class. These are properties
1225 added by the provider incorrectly.
1226
1227 @param formattedindication The generated indication to
1228 be formatted
1229 @param queryExpr, The query expression of the
1230 matched subscription needs to be
1231 used for indication projection
1232 @param ProviderSupportedProperties The properties are supported by
1233 yi.zhou 1.83 the indication provider
1234 @param indicationClassProperties The indication class properties
1235
1236 @return True, if the indication is formatted;
1237 False otherwise
1238 */
1239 Boolean _formatIndication(
1240 CIMInstance& formattedIndication,
1241 QueryExpression& queryExpr,
1242 const Array<CIMName>& providerSupportedProperties,
1243 const Array<CIMName>& indicationClassProperties);
1244
1245 /**
1246 Forward the formatted indication to the handler
1247
1248 @param matchedSubscription The matched subscription
1249 @param handlerInstance The handler instance for the matched
1250 subscription
1251 @param formattedIndication The formatted indication
1252 @param namespaceName The generated indication namespace
1253 @param operationContext The operation context
1254 yi.zhou 1.83 */
1255 void _forwardIndToHandler(
1256 const CIMInstance& matchedSubscription,
1257 const CIMInstance& handlerInstance,
1258 const CIMInstance& formattedIndication,
1259 const CIMNamespaceName& namespaceName,
1260 const OperationContext& operationContext);
1261
|
1262 kumpf 1.54 SubscriptionRepository* _subscriptionRepository;
|
1263 kumpf 1.51
|
1264 kumpf 1.54 SubscriptionTable * _subscriptionTable;
|
1265 kumpf 1.6
|
1266 kumpf 1.83.4.2 #ifdef PEGASUS_ENABLE_INDICATION_COUNT
1267 ProviderIndicationCountTable _providerIndicationCountTable;
1268 #endif
1269
|
1270 kumpf 1.8 /**
1271 Handle to Provider Registration Manager
1272 */
1273 ProviderRegistrationManager * _providerRegManager;
|
1274 kumpf 1.5
|
1275 carolann.graves 1.74 /**
|
1276 chuck 1.64 Pointer to CIMRepository, for use in building QueryExpression.
1277 */
1278 CIMRepository* _cimRepository;
1279
|
1280 kumpf 1.5 /**
1281 Integer representing queue ID for accessing Provider Manager Service
1282 */
1283 Uint32 _providerManager;
1284
1285 /**
1286 Integer representing queue ID for accessing Handler Manager Service
1287 */
1288 Uint32 _handlerService;
1289
1290 /**
|
1291 kumpf 1.46 Boolean indicating that the CIM Server has been configured to
1292 allow non-privileged users read and write access to the
1293 Subscription classes.
1294 */
1295 Boolean _enableSubscriptionsForNonprivilegedUsers;
1296
|
1297 kumpf 1.55 /**
|
1298 carolann.graves 1.80 Boolean indicating whether authentication is currently enabled in the
1299 CIM Server.
1300 */
1301 Boolean _authenticationEnabled;
1302
1303 /**
|
1304 kumpf 1.82 Gets the indication class specified by the subscription filter query.
|
1305 yi.zhou 1.66
|
1306 kumpf 1.82 @param instance the subscription instance
|
1307 yi.zhou 1.66
|
1308 kumpf 1.82 @return CIMClass object for the indication class
|
1309 yi.zhou 1.66 */
|
1310 kumpf 1.82 CIMClass _getIndicationClass(const CIMInstance& instance);
|
1311 yi.zhou 1.66
1312 /**
|
1313 kumpf 1.55 Arrays of valid and supported property values
1314
|
1315 carolann.graves 1.74 Notes:
|
1316 kumpf 1.55 Valid values are defined by the CIM Event Schema MOF
1317 Supported values are a subset of the valid values
1318 Some valid values, as defined in the MOF, are not currently supported
1319 by the Pegasus IndicationService
1320
|
1321 carolann.graves 1.74 Supported Values
|
1322 kumpf 1.55 SubscriptionState: Enabled, Disabled
1323 RepeatNotificationPolicy: Unknown, Other, None, Suppress, Delay
1324 OnFatalErrorPolicy: Ignore, Disable, Remove
1325 PersistenceType: Permanent, Transient
|
1326 yi.zhou 1.77 SNMPVersion: SNMPv1 Trap, SNMPv2C Trap
|
1327 kumpf 1.55 */
|
1328 kumpf 1.82 Array<Uint16> _validStates;
1329 Array<Uint16> _validRepeatPolicies;
1330 Array<Uint16> _validErrorPolicies;
1331 Array<Uint16> _validPersistenceTypes;
1332 Array<Uint16> _validSNMPVersion;
1333 Array<Uint16> _supportedStates;
1334 Array<Uint16> _supportedRepeatPolicies;
1335 Array<Uint16> _supportedErrorPolicies;
1336 Array<Uint16> _supportedPersistenceTypes;
1337 Array<Uint16> _supportedSNMPVersion;
|
1338 yi.zhou 1.66
|
1339 carolann.graves 1.76 /**
1340 Arrays of names of supported properties for each class
1341 */
|
1342 kumpf 1.82 Array<CIMName> _supportedSubscriptionProperties;
1343 Array<CIMName> _supportedFormattedSubscriptionProperties;
1344 Array<CIMName> _supportedFilterProperties;
1345 Array<CIMName> _supportedCIMXMLHandlerProperties;
1346 Array<CIMName> _supportedCIMXMLListenerDestinationProperties;
1347 Array<CIMName> _supportedSNMPHandlerProperties;
1348 Array<CIMName> _supportedSyslogListenerDestinationProperties;
1349 Array<CIMName> _supportedEmailListenerDestinationProperties;
|
1350 kumpf 1.1 };
1351
1352 PEGASUS_NAMESPACE_END
1353
|
1354 kumpf 1.41 #endif /* Pegasus_IndicationService_h */
|