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

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2