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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2