1 martin 1.15 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.16 //
|
3 martin 1.15 // 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.16 //
|
10 martin 1.15 // 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.16 //
|
17 martin 1.15 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.16 //
|
20 martin 1.15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.16 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.15 // 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.16 //
|
28 martin 1.15 //////////////////////////////////////////////////////////////////////////
|
29 w.white 1.1 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef ClientPerfDataStore_h
33 #define ClientPerfDataStore_h
34
35 #include <Pegasus/Common/CIMOperationType.h>
36 #include <Pegasus/Common/String.h>
|
37 w.white 1.7 #include <Pegasus/Common/TimeValue.h>
|
38 kumpf 1.13 #include <Pegasus/Common/Message.h>
|
39 w.white 1.1 #include <Pegasus/Client/Linkage.h>
|
40 w.white 1.3 #include <Pegasus/Client/ClientOpPerformanceDataHandler.h>
|
41 w.white 1.1
|
42 david.dillard 1.4 PEGASUS_NAMESPACE_BEGIN
43
|
44 w.white 1.5 class ClientOpPerformanceDataHandler;
|
45 w.white 1.3 struct ClientOpPerformanceData;
46
|
47 kumpf 1.12 /** The ClientPerfDataStore class is internal to pegasus. It has no API's
48 that client apps can access. It's purpose is to collect and calculate
49 the data that is returned to the client app in the
50 ClientOpPerformanceData object.
|
51 david.dillard 1.4 */
52 class PEGASUS_CLIENT_LINKAGE ClientPerfDataStore
|
53 w.white 1.1 {
54 public:
55
|
56 a.dunfey 1.10 ClientPerfDataStore();
|
57 w.white 1.1
|
58 kumpf 1.12 /** Resets all the data members to 0
|
59 w.white 1.1 */
60 void reset();
|
61 david.dillard 1.4
|
62 kumpf 1.12 /** Creates a ClientOpPerformanceData from the current values of of the
63 private data members
|
64 w.white 1.1 */
|
65 w.white 1.3 ClientOpPerformanceData createPerfDataStruct();
|
66 w.white 1.1
|
67 kumpf 1.12 /** Checks the currentMessageID and _operationType data members against
68 @param messageID and @param type if the values are equal
69 true is returned.
70 @param messageID
71 @param type CIM message type of current message
72 @return true if @param messageID equals currentMessageID data member
|
73 w.white 1.1 */
|
74 kumpf 1.13 Boolean checkMessageIDandType(const String& messageID, MessageType type);
|
75 w.white 1.1
|
76 kumpf 1.12 /** Sets the server time data member
|
77 w.white 1.1 */
|
78 w.white 1.7 void setServerTime(Uint32 time);
|
79 w.white 1.1
|
80 kumpf 1.12 /** Sets the responsSize data member
|
81 w.white 1.1 */
|
82 kumpf 1.14 void setResponseSize(Uint32 size);
|
83 w.white 1.1
|
84 kumpf 1.12 /** Sets the _requestSize data member
|
85 w.white 1.1 */
|
86 kumpf 1.14 void setRequestSize(Uint32 size);
|
87 w.white 1.1
|
88 kumpf 1.12 /** Sets startNetworkTime data member
|
89 w.white 1.1 */
|
90 kumpf 1.12 void setStartNetworkTime();
|
91 w.white 1.1
|
92 kumpf 1.12 /** Sets endNetworkTime data member
|
93 w.white 1.1 */
|
94 w.white 1.7 void setEndNetworkTime(TimeValue time);
|
95 w.white 1.1
|
96 kumpf 1.12 /** Sets validServerTime data member
|
97 w.white 1.1 */
|
98 w.white 1.3 void setServerTimeKnown(Boolean bol);
|
99 w.white 1.1
|
100 kumpf 1.12 /** Sets _operationType data member by translating message type given by
101 @param type, into a CIMOperationType. That value is used to set the
102 _operationType data member and is returned.
103 @param type integer repesenting the message type
|
104 w.white 1.1 */
|
105 kumpf 1.13 void setOperationType(MessageType type);
|
106 w.white 1.1
107 //void setErrorCondition(Boolean bol);
108
|
109 w.white 1.6 String toString() const;
|
110 w.white 1.1
111 void setMessageID(String messageID);
112
|
113 w.white 1.6 Boolean getStatError() const;
|
114 w.white 1.3
115 void setClassRegistered(Boolean bol);
116
117 static ClientPerfDataStore *current_Store;
118
|
119 kumpf 1.12 ClientOpPerformanceDataHandler* handler_prt;
|
120 w.white 1.3
|
121 w.white 1.6 Boolean isClassRegistered() const;
|
122 w.white 1.3
123 protected:
124 CIMOperationType _operationType;
125 Boolean _serverTimeKnown;
126 Boolean _errorCondition;
127 Boolean _classRegistered;
|
128 kumpf 1.14 Uint32 _serverTime;
129 Uint32 _requestSize;
130 Uint32 _responseSize;
|
131 w.white 1.3 String _messID;
|
132 w.white 1.7 TimeValue _networkEndTime;
133 TimeValue _networkStartTime;
|
134 david.dillard 1.4
|
135 a.dunfey 1.10 private:
136 // Make copy-constructor and assignment operator private
137 ClientPerfDataStore(const ClientPerfDataStore & dataStore);
138 ClientPerfDataStore& operator=(const ClientPerfDataStore& dataStore);
|
139 david.dillard 1.4 };
140
|
141 w.white 1.1
142 PEGASUS_NAMESPACE_END
143
144 #endif /* ClientPerfDataStore_h */
145
|