(file) Return to CIMIndicationProvider.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Provider

  1 martin 1.32 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.33 //
  3 martin 1.32 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.33 //
 10 martin 1.32 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.33 //
 17 martin 1.32 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.33 //
 20 martin 1.32 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.33 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.32 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.33 //
 28 martin 1.32 //////////////////////////////////////////////////////////////////////////
 29 chip   1.1  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             #ifndef Pegasus_CIMIndicationProvider_h
 33             #define Pegasus_CIMIndicationProvider_h
 34             
 35             #include <Pegasus/Common/Config.h>
 36 kumpf  1.20 #include <Pegasus/Provider/CIMProvider.h>
 37 chip   1.1  
 38             #include <Pegasus/Common/Array.h>
 39 kumpf  1.7  #include <Pegasus/Common/CIMObjectPath.h>
 40 chip   1.1  #include <Pegasus/Common/CIMDateTime.h>
 41 chip   1.11 #include <Pegasus/Common/CIMIndication.h>
 42 kumpf  1.17 #include <Pegasus/Provider/Linkage.h>
 43 chip   1.1  
 44             PEGASUS_NAMESPACE_BEGIN
 45             
 46             /**
 47 kumpf  1.23     This class defines the set of methods implemented by an indication
 48                 provider.  A provider that derives from this class must implement all
 49 kumpf  1.31     methods.  A minimal method implementation may simply throw a
 50 kumpf  1.23     CIMNotSupportedException.
 51 chip   1.1  */
 52 kumpf  1.30 class PEGASUS_PROVIDER_LINKAGE CIMIndicationProvider :
 53                 public virtual CIMProvider
 54 chip   1.1  {
 55             public:
 56 kumpf  1.31     /**
 57                     Constructs a default CIMIndicationProvider object.
 58 karl   1.22     */
 59 kumpf  1.30     CIMIndicationProvider();
 60 kumpf  1.23 
 61 kumpf  1.31     /**
 62                     Destructs a CIMIndicationProvider object.
 63 karl   1.22     */
 64 kumpf  1.30     virtual ~CIMIndicationProvider();
 65 chip   1.1  
 66 kumpf  1.31     /**
 67                     Instructs the provider to begin generating indications.  One or
 68 kumpf  1.23         more createSubscription calls may precede the call to this method.
 69                     (On start-up, createSubscription is called for each active
 70                     subscription before the enableIndications method is called, so that
 71                     the provider knows about all outstanding subscriptions before it
 72                     begins generating indications.)
 73             
 74 kumpf  1.25         The provider must set the namespace and class name in the object path
 75                     of the generated indication instance (to allow the Indication Processor
 76                     to filter generated indications based on the Filter SourceNamespace and
 77                     Query indication class name), as in the following example:
 78             
 79                     <pre>
 80 kumpf  1.31         CIMObjectPath path(
 81                         String::EMPTY,
 82                         CIMNamespaceName("root/IndicationSource"),
 83                         CIMName("IndicationClassName"),
 84                         Array<CIMKeyBinding>());
 85 kumpf  1.25         indicationInstance.setPath(path);
 86                     </pre>
 87             
 88                     where "root/IndicationSource" is the namespace from which the
 89                     indication was generated, and "IndicationClassName" is the class name
 90                     of the generated indication.  Note that indication instance paths never
 91                     have key bindings.
 92             
 93 kumpf  1.23         An exception thrown by this method is considered a provider error
 94                     and does not affect CIM Server behavior.
 95             
 96                     @param handler An IndicationResponseHandler used by the provider to
 97 kumpf  1.31             deliver the indications it generates.  The IndicationResponseHandler
 98                         object remains valid until the disableIndications method is called.
 99                         After disableIndications is called, the behavior of the
100                         IndicationResponseHandler is undefined.
101 chip   1.8      */
102 kumpf  1.23     virtual void enableIndications(IndicationResponseHandler & handler) = 0;
103 karl   1.22 
104 kumpf  1.31     /**
105                     Instructs the provider to stop generating indications.  After this
106                     call, the IndicationResponseHandler given to the provider in the
107 kumpf  1.23         enableIndications method is no longer valid and its behavior is
108                     undefined.  Information regarding active subscriptions no longer
109                     applies to the provider and should be discarded at this time.
110                     (The provider will receive new createSubscription calls to restore
111                     necessary state before enableIndications is called again.)
112 chip   1.8  
113 kumpf  1.23         An exception thrown by this method is considered a provider error
114                     and does not affect CIM Server behavior.
115 chip   1.8      */
116 kumpf  1.30     virtual void disableIndications() = 0;
117 chip   1.8  
118 kumpf  1.31     /**
119                     Instructs the provider to monitor for indications matching the
120                     specified subscription.  The provider may reject the subscription by
121                     throwing a CIMNotSupportedException.  An indication provider must
122                     reject the subscription as not supported if the provider cannot carry
123                     out the specified RepeatNotificationPolicy with the specified
124 kumpf  1.24         RepeatNotificationInterval, RepeatNotificationGap and
125                     RepeatNotificationCount.
126 kumpf  1.23 
127                     Note that it is not necessary for a simple indication provider to
128                     take any action on createSubscription, modifySubscription, or
129                     deleteSubscription.  It may simply generate indications (or not)
130                     based on the enableIndications and disableIndications calls.
131             
132                     An indication provider is not required to retain or make use of any
133                     specific subscription information.  (A provider that accepts a
134                     subscription with a RepeatNotificationPolicy value other than "None",
135                     however, requires this data for proper operation.)
136             
137                     An indication should only be generated once regardless of the
138                     number of active subscriptions.  The indication will be sent to
139                     each applicable handler.  If an indication should not be sent to all
140                     subscribers (such as when the provider has accepted one or more
141                     subscriptions with a RepeatNotificationPolicy defined), the provider
142                     must include in a SubscriptionInstanceNamesContainer the list of
143                     subscriptions for which the indication is intended.
144             
145 kumpf  1.31         @param context An OperationContext object containing the context for
146                         the processing of the subscription.  The context includes the name
147                         of the subscribing user, language information, and other data.
148                         Of particular interest to indication providers are the
149                         SubscriptionInstanceContainer and
150                         SubscriptionFilterConditionContainer containers.  The
151                         SubscriptionInstanceContainer contains the full
152                         CIM_IndicationSubscription instance (including, for example, more
153                         information about repeat notification policies).  The
154                         SubscriptionFilterConditionContainer contains the query string and
155                         query language from the CIM_IndicationFilter instance.
156             
157                     @param subscriptionName A CIMObjectPath containing the name of the
158                         CIM_IndicationSubscription instance for which the provider is
159                         requested to generate indications.
160 kumpf  1.23 
161 karl   1.22         @param classNames Contains a list of indication class names for
162 kumpf  1.31             which the provider has registered as an indication provider and are
163                         included in the CIM_IndicationFilter for this subscription instance.
164                         A provider may use this as medium-level data for controlling which
165                         indications it generates.
166             
167                     @param propertyList A CIMPropertyList specifying the minimum set of
168                         properties required in the indications generated for this
169                         subscription.  Support for this parameter is optional, so the
170                         generated indications may contain properties not specified in the
171                         list.  A null propertyList indicates that all properties must be
172                         included.  A non-null, but empty, propertyList indicates that no
173                         properites are required.
174 kumpf  1.23 
175                     @param repeatNotificationPolicy Contains the value of the property
176 kumpf  1.31             with the same name in the CIM_IndicationSubscription instance.
177                         Most providers will probably not support repeat notification
178                         policies, and should throw a CIMNotSupportedException if the value
179                         is anything other than "None".
180             
181                     @exception CIMNotSupportedException
182 chip   1.8      */
183 chip   1.9      virtual void createSubscription(
184 chip   1.14         const OperationContext & context,
185                     const CIMObjectPath & subscriptionName,
186                     const Array<CIMObjectPath> & classNames,
187                     const CIMPropertyList & propertyList,
188                     const Uint16 repeatNotificationPolicy) = 0;
189 chip   1.8  
190 kumpf  1.31     /**
191                     Informs the provider that a subscription instance it is serving has
192 kumpf  1.23         changed.
193             
194 kumpf  1.31         @param context An OperationContext object containing the context for
195                         the processing of the subscription.  The context includes the name
196                         of the subscribing user, language information, and other data.
197                         Of particular interest to indication providers are the
198                         SubscriptionInstanceContainer and
199                         SubscriptionFilterConditionContainer containers.  The
200                         SubscriptionInstanceContainer contains the full
201                         CIM_IndicationSubscription instance (including, for example, more
202                         information about repeat notification policies).  The
203                         SubscriptionFilterConditionContainer contains the query string and
204                         query language from the CIM_IndicationFilter instance.
205             
206                     @param subscriptionName A CIMObjectPath containing the name of the
207                         CIM_IndicationSubscription instance that is being modified and for
208                         which the provider has been requested to generate indications.
209 kumpf  1.23 
210 karl   1.22         @param classNames Contains a list of indication class names for
211 kumpf  1.31             which the provider has registered as an indication provider and are
212                         included in the CIM_IndicationFilter for this subscription instance.
213                         A provider may use this as medium-level data for controlling which
214                         indications it generates.
215             
216                     @param propertyList A CIMPropertyList specifying the minimum set of
217                         properties required in the indications generated for this
218                         subscription.  Support for this parameter is optional, so the
219                         generated indications may contain properties not specified in the
220                         list.  A null propertyList indicates that all properties must be
221                         included.  A non-null, but empty, propertyList indicates that no
222                         properites are required.
223 kumpf  1.23 
224                     @param repeatNotificationPolicy Contains the value of the property
225 kumpf  1.31             with the same name in the CIM_IndicationSubscription instance.
226                         Most providers will probably not support repeat notification
227                         policies, and should throw a CIMNotSupportedException if the value
228                         is anything other than "None".
229             
230                     @exception CIMNotSupportedException
231 chip   1.11     */
232 chip   1.9      virtual void modifySubscription(
233 chip   1.14         const OperationContext & context,
234                     const CIMObjectPath & subscriptionName,
235                     const Array<CIMObjectPath> & classNames,
236                     const CIMPropertyList & propertyList,
237                     const Uint16 repeatNotificationPolicy) = 0;
238 chip   1.8  
239 kumpf  1.31     /**
240                     Instructs the provider to stop generating indications for a specified
241                     subscription.
242 kumpf  1.23 
243                     An exception thrown by this method is considered a provider error
244                     and does not affect CIM Server behavior.
245             
246 kumpf  1.31         @param context An OperationContext object containing the context for
247                         the processing of the operation.  The context includes the name
248                         of the requesting user, language information, and other data.
249             
250                     @param subscriptionName A CIMObjectPath containing the name of the
251                         CIM_IndicationSubscription instance for which the provider is
252                         requested to stop generating indications.
253 kumpf  1.23 
254 karl   1.22         @param classNames Contains a list of indication class names for
255 kumpf  1.31             which the provider has registered as an indication provider and are
256                         included in the CIM_IndicationFilter for this subscription instance.
257                         A provider may use this as medium-level data for controlling which
258                         indications it generates.
259 chip   1.11     */
260 chip   1.10     virtual void deleteSubscription(
261 chip   1.14         const OperationContext & context,
262                     const CIMObjectPath & subscriptionName,
263                     const Array<CIMObjectPath> & classNames) = 0;
264 chip   1.5  };
265             
266 chip   1.1  PEGASUS_NAMESPACE_END
267             
268 chip   1.3  #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2