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

  1 martin 1.4 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.5 //
  3 martin 1.4 // 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.5 //
 10 martin 1.4 // 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.5 //
 17 martin 1.4 // The above copyright notice and this permission notice shall be included
 18            // in all copies or substantial portions of the Software.
 19 martin 1.5 //
 20 martin 1.4 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.5 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.4 // 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.5 //
 28 martin 1.4 //////////////////////////////////////////////////////////////////////////
 29 kumpf  1.2 //
 30            //%/////////////////////////////////////////////////////////////////////////////
 31            
 32            #ifndef Pegasus_WsmRequest_h
 33            #define Pegasus_WsmRequest_h
 34            
 35            #include <Pegasus/Common/Config.h>
 36            #include <Pegasus/Common/OperationContext.h>
 37            #include <Pegasus/Common/AcceptLanguageList.h>
 38            #include <Pegasus/Common/ContentLanguageList.h>
 39            #include <Pegasus/Common/ArrayInternal.h>
 40            #include <Pegasus/Common/Message.h>
 41 kumpf  1.3 #include <Pegasus/WsmServer/WsmConstants.h>
 42 kumpf  1.2 #include <Pegasus/WsmServer/WsmSelectorSet.h>
 43            #include <Pegasus/WsmServer/WsmInstance.h>
 44            
 45            PEGASUS_NAMESPACE_BEGIN
 46            
 47            enum WsmOperationType
 48            {
 49                WSM_FAULT,
 50                SOAP_FAULT,
 51            
 52                WSM_IDENTITY_IDENTIFY,
 53            
 54                WS_TRANSFER_GET,
 55                WS_TRANSFER_PUT,
 56                WS_TRANSFER_CREATE,
 57                WS_TRANSFER_DELETE,
 58            
 59                WS_ENUMERATION_ENUMERATE,
 60                WS_ENUMERATION_PULL,
 61                WS_ENUMERATION_RELEASE
 62                // etc.
 63 kumpf  1.2 };
 64            
 65            class WsmRequest
 66            {
 67            public:
 68            
 69                WsmRequest(
 70                    WsmOperationType type,
 71                    const String& messageId_)
 72                    : messageId(messageId_),
 73 kumpf  1.3           httpMethod(HTTP_METHOD__POST),
 74                      httpCloseConnect(false),
 75                      queueId(0),
 76                      requestEpr(false),
 77                      maxEnvelopeSize(0),
 78 kumpf  1.2           _type(type)
 79                {
 80                }
 81            
 82                virtual ~WsmRequest()
 83                {
 84                }
 85            
 86                WsmOperationType getType() const
 87                {
 88                    return _type;
 89                }
 90            
 91                String messageId;
 92                String authType;
 93                String userName;
 94                String ipAddress;
 95                HttpMethod httpMethod;
 96                AcceptLanguageList acceptLanguages;
 97                ContentLanguageList contentLanguages;
 98                Boolean httpCloseConnect;
 99 kumpf  1.2     Uint32 queueId;
100                Boolean requestEpr;
101                Uint32 maxEnvelopeSize;
102            
103            private:
104            
105                WsmOperationType _type;
106            };
107            
108 kumpf  1.3 class WxfGetRequest : public WsmRequest
109 kumpf  1.2 {
110            public:
111            
112 kumpf  1.3     WxfGetRequest(
113 kumpf  1.2         const String& messageId,
114                    const WsmEndpointReference& epr_)
115                    : WsmRequest(WS_TRANSFER_GET, messageId),
116                      epr(epr_)
117                {
118                }
119            
120                WsmEndpointReference epr;
121            };
122            
123 kumpf  1.3 class WxfPutRequest : public WsmRequest
124 kumpf  1.2 {
125            public:
126            
127 kumpf  1.3     WxfPutRequest(
128 kumpf  1.2         const String& messageId,
129                    const WsmEndpointReference& epr_,
130                    const WsmInstance& instance_)
131                    : WsmRequest(WS_TRANSFER_PUT, messageId),
132                      epr(epr_),
133                      instance(instance_)
134                {
135                }
136            
137                WsmEndpointReference epr;
138                WsmInstance instance;
139            };
140            
141 kumpf  1.3 class WxfCreateRequest : public WsmRequest
142 kumpf  1.2 {
143            public:
144            
145 kumpf  1.3     WxfCreateRequest(
146 kumpf  1.2         const String& messageId,
147                    const WsmEndpointReference& epr_,
148                    const WsmInstance& instance_)
149                    : WsmRequest(WS_TRANSFER_CREATE, messageId),
150                      epr(epr_),
151                      instance(instance_)
152                {
153                }
154            
155                WsmEndpointReference epr;
156                WsmInstance instance;
157            };
158            
159 kumpf  1.3 class WxfDeleteRequest : public WsmRequest
160 kumpf  1.2 {
161            public:
162            
163 kumpf  1.3     WxfDeleteRequest(
164 kumpf  1.2         const String& messageId,
165                    const WsmEndpointReference& epr_)
166                    : WsmRequest(WS_TRANSFER_DELETE, messageId),
167                      epr(epr_)
168                {
169                }
170            
171                WsmEndpointReference epr;
172            };
173            
174 kumpf  1.3 class WsenEnumerateRequest : public WsmRequest
175            {
176            public:
177            
178                WsenEnumerateRequest(
179                    const String& messageId,
180                    const WsmEndpointReference& epr_,
181                    const String& expiration_,
182                    Boolean requestItemCount_,
183                    Boolean optimized_,
184                    Uint32 maxElements_,
185                    WsenEnumerationMode enumerationMode_,
186                    WsmbPolymorphismMode polymorphismMode_)
187                    : WsmRequest(WS_ENUMERATION_ENUMERATE, messageId),
188                      epr(epr_),
189                      expiration(expiration_),
190                      requestItemCount(requestItemCount_),
191                      optimized(optimized_),
192                      maxElements(maxElements_),
193                      enumerationMode(enumerationMode_),
194                      polymorphismMode(polymorphismMode_)
195 kumpf  1.3     {
196                }
197            
198                WsmEndpointReference epr;
199                String expiration;
200                Boolean requestItemCount;
201                Boolean optimized;
202                Uint32 maxElements;
203                WsenEnumerationMode enumerationMode;
204                WsmbPolymorphismMode polymorphismMode;
205            };
206            
207            class WsenPullRequest : public WsmRequest
208            {
209            public:
210            
211                WsenPullRequest(
212                    const String& messageId,
213                    const WsmEndpointReference& epr_,
214                    Uint64 enumerationContext_,
215                    const String& maxTime_,
216 kumpf  1.3         Boolean requestItemCount_,
217                    Uint32 maxElements_,
218                    Uint32 maxCharacters_)
219                    : WsmRequest(WS_ENUMERATION_PULL, messageId),
220                      epr(epr_),
221                      enumerationContext(enumerationContext_),
222                      maxTime(maxTime_),
223                      requestItemCount(requestItemCount_),
224                      maxElements(maxElements_),
225                      maxCharacters(maxCharacters_)
226                {
227                }
228            
229                WsmEndpointReference epr;
230                Uint64 enumerationContext;
231                String maxTime;
232                Boolean requestItemCount;
233                Uint32 maxElements;
234                Uint32 maxCharacters;
235            };
236            
237 kumpf  1.3 class WsenReleaseRequest : public WsmRequest
238            {
239            public:
240            
241                WsenReleaseRequest(
242                    const String& messageId,
243                    const WsmEndpointReference& epr_,
244                    Uint64 enumerationContext_)
245                    : WsmRequest(WS_ENUMERATION_RELEASE, messageId),
246                      epr(epr_),
247                      enumerationContext(enumerationContext_)
248                {
249                }
250            
251                WsmEndpointReference epr;
252 kumpf  1.6     Uint64 enumerationContext;
253 kumpf  1.3 };
254            
255 kumpf  1.2 PEGASUS_NAMESPACE_END
256            
257            #endif /* Pegasus_WsmRequest_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2