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