3 kumpf 1.4 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
4 // The Open Group, Tivoli Systems
|
5 mike 1.2 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to
8 // deal in the Software without restriction, including without limitation the
9 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 // sell copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
14 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
15 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
16 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
18 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 //
22 //==============================================================================
23 //
24 // Author: Chip Vincent (cvincent@us.ibm.com)
25 //
|
47 kumpf 1.4 /**
48 Callback to deliver results to the CIMOM.
49
50 <p>The <tt>ResponseHandler</tt> class allows a provider
51 to report operation progress and results to the CIMOM.
52 Subclasses are defined for each of the types of object
53 that a provider can deliver to the CIMOM.
54 A <tt>ResponseHandler</tt> object of the appropriate type
55 is passed to provider
56 functions that are invoked to process client requests (it
57 is not passed to the <tt>{@link initialize initialize}</tt>
58 or <tt>{@link terminate terminate}</tt> functions). It
59 contains the following public member functions that
60 may be used to deliver results to the CIMOM:</p>
61 <ul>
62 <li><tt>{@link processing processing}</tt> - inform the CIMOM
63 that delivery of results is beginning</li>
64 <li><tt>{@link deliver deliver}</tt> - deliver an incremental
65 result to the CIMOM; the CIMOM accumulates results as
66 they are received from the provider</li>
67 <li><tt>{@link complete complete}</tt> - inform the CIMOM that
68 kumpf 1.4 process of the request is complete and that no further
69 results will be delivered</li>
70 </ul>
71 */
72
73 class PEGASUS_PROVIDER_LINKAGE ResponseHandler
74 {
75 public:
76
77 /**
78 Destructor.
79 */
80 virtual ~ResponseHandler(void);
81
82 /**
83 Deliver a possibly partial result to CIMOM.
84 <p>The <tt>deliver</tt> function is used by providers to
85 deliver results to the CIMOM. For operations that require a
86 single element result (<tt>getInstance</tt>, for example),
87 <tt>deliver</tt> should be called only once to deliver the
88 entire result. For operations that involve
89 kumpf 1.4 enumeration, the single-element form shown here may be
90 used, each iteration delivering an incremental element
91 of the total result. The Array form below may be used
92 to deliver a larger set of result elements.</p>
93 */
94 //virtual void deliver(const T & object);
95
96 /**
97 Deliver a set of results to CIMOM.
98 <p>This form of the <tt>deliver</tt> function may be used
99 to return a set of elements to the CIMOM. The set is not
100 required to be complete, and the provider may invoke this
101 function multiple times, if necessary. This form should only
102 be used when the operation requires a result consisting
103 of more than one element, such as an enumeration.</p>
104 */
105 //virtual void deliver(const Array<T> & objects);
106
107 /**
108 Inform the CIMOM that delivery of results will begin.
109 <p>The provider must call <tt>processing</tt> before
110 kumpf 1.4 attempting to call <tt>deliver</tt>.
111 */
112 virtual void processing(void) = 0;
113
114 /**
115 Inform the CIMOM that delivery of results is complete.
116 <p>The provider must call <tt>complete</tt> when all
117 results have been delivered. It must not call <tt>deliver</tt>
118 after calling <tt>complete</tt>.</p>
119 */
120 virtual void complete(void) = 0;
121 };
122
123
124 //
125 // InstanceResponseHandler
126 //
127 class PEGASUS_PROVIDER_LINKAGE InstanceResponseHandler : virtual public ResponseHandler
128 {
129 public:
130 virtual void deliver(const CIMInstance & instance) = 0;
131 kumpf 1.4
132 virtual void deliver(const Array<CIMInstance> & instances) = 0;
133 };
134
135
136 //
137 // ObjectPathResponseHandler
138 //
139 class PEGASUS_PROVIDER_LINKAGE ObjectPathResponseHandler : virtual public ResponseHandler
140 {
141 public:
142 virtual void deliver(const CIMObjectPath & objectPath) = 0;
143
144 virtual void deliver(const Array<CIMObjectPath> & objectPaths) = 0;
145 };
146
147
148 //
149 // MethodResultResponseHandler
150 //
151 class PEGASUS_PROVIDER_LINKAGE MethodResultResponseHandler : virtual public ResponseHandler
152 kumpf 1.4 {
153 public:
154 virtual void deliverParamValue(const CIMParamValue & outParamValue) = 0;
155
156 virtual void deliverParamValue(const Array<CIMParamValue> & outParamValues) = 0;
157
158 virtual void deliver(const CIMValue & returnValue) = 0;
159 };
160
161
162 //
163 // IndicationResponseHandler
164 //
165 class PEGASUS_PROVIDER_LINKAGE IndicationResponseHandler : virtual public ResponseHandler
166 {
167 public:
168 virtual void deliver(const CIMIndication & indication) = 0;
169
170 virtual void deliver(const Array<CIMIndication> & indications) = 0;
171 };
172
173 kumpf 1.4
174 //
175 // ObjectResponseHandler
176 //
177 class PEGASUS_PROVIDER_LINKAGE ObjectResponseHandler : virtual public ResponseHandler
178 {
179 public:
180 virtual void deliver(const CIMObject & object) = 0;
181
182 virtual void deliver(const Array<CIMObject> & objects) = 0;
183 };
184
185
186 //
187 // ValueResponseHandler
188 //
189 class PEGASUS_PROVIDER_LINKAGE ValueResponseHandler : virtual public ResponseHandler
190 {
191 public:
192 virtual void deliver(const CIMValue & value) = 0;
193
194 kumpf 1.4 virtual void deliver(const Array<CIMValue> & values) = 0;
195 };
196
197
198 //
199 // ClassResponseHandler
200 //
201 class PEGASUS_PROVIDER_LINKAGE ClassResponseHandler : virtual public ResponseHandler
|