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