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

File: [Pegasus] / pegasus / src / Pegasus / WsmServer / WsmRequest.h (download)
Revision: 1.8, Thu Dec 9 19:47:55 2010 UTC (13 years, 6 months ago) by karl
Branch: MAIN
CVS Tags: TASK_PEP317_1JUNE_2013, TASK-PEP317_pullop-root, RELEASE_2_11_2-RC1, RELEASE_2_11_2, RELEASE_2_11_1-RC1, RELEASE_2_11_1, RELEASE_2_11_0-RC1, RELEASE_2_11_0-FC, RELEASE_2_11_0, RELEASE_2_11-root, RELEASE_2_11-branch, BeforeUpdateToHeadOct82011
Branch point for: TASK-PEP317_pullop-branch
Changes since 1.7: +5 -9 lines
BUG#: 8871
TITLE: Implement Wsman Association Filter for WSM Server

DESCRIPTION: Implement the functionality of the Association Filter for
Wsman per DSP0227 Sect 8.2 and static tests for this option

//%LICENSE////////////////////////////////////////////////////////////////
//
// Licensed to The Open Group (TOG) under one or more contributor license
// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
// this work for additional information regarding copyright ownership.
// Each contributor licenses this file to you under the OpenPegasus Open
// Source License; you may not use this file except in compliance with the
// License.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//////////////////////////////////////////////////////////////////////////
//
//%/////////////////////////////////////////////////////////////////////////////

#ifndef Pegasus_WsmRequest_h
#define Pegasus_WsmRequest_h

#include <Pegasus/Common/Config.h>
#include <Pegasus/Common/OperationContext.h>
#include <Pegasus/Common/AcceptLanguageList.h>
#include <Pegasus/Common/ContentLanguageList.h>
#include <Pegasus/Common/ArrayInternal.h>
#include <Pegasus/Common/Message.h>
#include <Pegasus/Common/SharedPtr.h>
#include <Pegasus/WsmServer/WsmConstants.h>
#include <Pegasus/WsmServer/WsmSelectorSet.h>
#include <Pegasus/WsmServer/WsmInstance.h>
#include <Pegasus/WQL/WQLParser.h>
#include <Pegasus/WsmServer/WsmFilter.h>

PEGASUS_NAMESPACE_BEGIN

enum WsmOperationType
{
    WSM_FAULT,
    SOAP_FAULT,

    WSM_IDENTITY_IDENTIFY,

    WS_TRANSFER_GET,
    WS_TRANSFER_PUT,
    WS_TRANSFER_CREATE,
    WS_TRANSFER_DELETE,

    WS_ENUMERATION_ENUMERATE,
    WS_ENUMERATION_PULL,
    WS_ENUMERATION_RELEASE,

    /* WS-Management invoke */
    WS_INVOKE
    // etc.
};

class WsmRequest
{
public:

    WsmRequest(
        WsmOperationType type,
        const String& messageId_)
        : messageId(messageId_),
          httpMethod(HTTP_METHOD__POST),
          httpCloseConnect(false),
          omitXMLProcessingInstruction(false),
          queueId(0),
          requestEpr(false),
          maxEnvelopeSize(0),
          _type(type)
    {
    }

    virtual ~WsmRequest()
    {
    }

    WsmOperationType getType() const
    {
        return _type;
    }

    String messageId;
    String authType;
    String userName;
    String ipAddress;
    HttpMethod httpMethod;
    AcceptLanguageList acceptLanguages;
    ContentLanguageList contentLanguages;
    Boolean httpCloseConnect;
    Boolean omitXMLProcessingInstruction;
    Uint32 queueId;
    Boolean requestEpr;
    Uint32 maxEnvelopeSize;

private:

    WsmOperationType _type;
};

class WxfGetRequest : public WsmRequest
{
public:

    WxfGetRequest(
        const String& messageId,
        const WsmEndpointReference& epr_)
        : WsmRequest(WS_TRANSFER_GET, messageId),
          epr(epr_)
    {
    }

    WsmEndpointReference epr;
};

class WxfPutRequest : public WsmRequest
{
public:

    WxfPutRequest(
        const String& messageId,
        const WsmEndpointReference& epr_,
        const WsmInstance& instance_)
        : WsmRequest(WS_TRANSFER_PUT, messageId),
          epr(epr_),
          instance(instance_)
    {
    }

    WsmEndpointReference epr;
    WsmInstance instance;
};

class WxfCreateRequest : public WsmRequest
{
public:

    WxfCreateRequest(
        const String& messageId,
        const WsmEndpointReference& epr_,
        const WsmInstance& instance_)
        : WsmRequest(WS_TRANSFER_CREATE, messageId),
          epr(epr_),
          instance(instance_)
    {
    }

    WsmEndpointReference epr;
    WsmInstance instance;
};

class WxfDeleteRequest : public WsmRequest
{
public:

    WxfDeleteRequest(
        const String& messageId,
        const WsmEndpointReference& epr_)
        : WsmRequest(WS_TRANSFER_DELETE, messageId),
          epr(epr_)
    {
    }

    WsmEndpointReference epr;
};

class WsenEnumerateRequest : public WsmRequest
{
public:

    WsenEnumerateRequest(
        const String& messageId,
        const WsmEndpointReference& epr_,
        const String& expiration_,
        Boolean requestItemCount_,
        Boolean optimized_,
        Uint32 maxElements_,
        WsenEnumerationMode enumerationMode_,
        WsmbPolymorphismMode polymorphismMode_,
        WsmFilter wsmFilter_
        )
        : WsmRequest(WS_ENUMERATION_ENUMERATE, messageId),
          epr(epr_),
          expiration(expiration_),
          requestItemCount(requestItemCount_),
          optimized(optimized_),
          maxElements(maxElements_),
          enumerationMode(enumerationMode_),
          polymorphismMode(polymorphismMode_),
          wsmFilter(wsmFilter_)
    {
    }

    ~WsenEnumerateRequest()
    {
    }

    WsmEndpointReference epr;
    String expiration;
    Boolean requestItemCount;
    Boolean optimized;
    Uint32 maxElements;
    WsenEnumerationMode enumerationMode;
    WsmbPolymorphismMode polymorphismMode;
    WsmFilter wsmFilter;
};

class WsenPullRequest : public WsmRequest
{
public:

    WsenPullRequest(
        const String& messageId,
        const WsmEndpointReference& epr_,
        Uint64 enumerationContext_,
        const String& maxTime_,
        Boolean requestItemCount_,
        Uint32 maxElements_,
        Uint32 maxCharacters_)
        : WsmRequest(WS_ENUMERATION_PULL, messageId),
          epr(epr_),
          enumerationContext(enumerationContext_),
          maxTime(maxTime_),
          requestItemCount(requestItemCount_),
          maxElements(maxElements_),
          maxCharacters(maxCharacters_)
    {
    }

    WsmEndpointReference epr;
    Uint64 enumerationContext;
    String maxTime;
    Boolean requestItemCount;
    Uint32 maxElements;
    Uint32 maxCharacters;
};

class WsenReleaseRequest : public WsmRequest
{
public:

    WsenReleaseRequest(
        const String& messageId,
        const WsmEndpointReference& epr_,
        Uint64 enumerationContext_)
        : WsmRequest(WS_ENUMERATION_RELEASE, messageId),
          epr(epr_),
          enumerationContext(enumerationContext_)
    {
    }

    WsmEndpointReference epr;
    Uint64 enumerationContext;
};

class WsInvokeRequest : public WsmRequest
{
public:

    WsInvokeRequest(
        const String& messageId,
        const WsmEndpointReference& epr_,
        const String& className_,
        const String& methodName_,
        const WsmInstance& instance_)
        :
        WsmRequest(WS_INVOKE, messageId),
        epr(epr_),
        className(className_),
        methodName(methodName_),
        instance(instance_)
    {
    }

    WsmEndpointReference epr;
    String className;
    String methodName;
    WsmInstance instance;
};

PEGASUS_NAMESPACE_END

#endif /* Pegasus_WsmRequest_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2