1 karl 1.11 //%2006////////////////////////////////////////////////////////////////////////
|
2 w.white 1.1 //
3 // 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 // IBM Corp.; EMC Corporation, The Open Group.
7 // 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.2 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.11 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 w.white 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.11 //
|
21 w.white 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 karl 1.11 //
|
30 w.white 1.1 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef ClientPerfDataStore_h
35 #define ClientPerfDataStore_h
36
37 #include <Pegasus/Common/CIMOperationType.h>
38 #include <Pegasus/Common/String.h>
|
39 w.white 1.7 #include <Pegasus/Common/TimeValue.h>
|
40 w.white 1.1 #include <Pegasus/Client/Linkage.h>
|
41 w.white 1.3 #include <Pegasus/Client/ClientOpPerformanceDataHandler.h>
|
42 w.white 1.1
|
43 david.dillard 1.4 PEGASUS_NAMESPACE_BEGIN
44
|
45 w.white 1.5 class ClientOpPerformanceDataHandler;
|
46 w.white 1.3 struct ClientOpPerformanceData;
47
|
48 kumpf 1.12 /** The ClientPerfDataStore class is internal to pegasus. It has no API's
49 that client apps can access. It's purpose is to collect and calculate
50 the data that is returned to the client app in the
51 ClientOpPerformanceData object.
|
52 david.dillard 1.4 */
53 class PEGASUS_CLIENT_LINKAGE ClientPerfDataStore
|
54 w.white 1.1 {
55 public:
56
|
57 a.dunfey 1.10 ClientPerfDataStore();
|
58 w.white 1.1
|
59 kumpf 1.12 /** Resets all the data members to 0
|
60 w.white 1.1 */
61 void reset();
|
62 david.dillard 1.4
|
63 kumpf 1.12 /** Creates a ClientOpPerformanceData from the current values of of the
64 private data members
|
65 w.white 1.1 */
|
66 w.white 1.3 ClientOpPerformanceData createPerfDataStruct();
|
67 w.white 1.1
|
68 kumpf 1.12 /** Checks the currentMessageID and _operationType data members against
69 @param messageID and @param type if the values are equal
70 true is returned.
71 @param messageID
72 @param type CIM message type of current message
73 @return true if @param messageID equals currentMessageID data member
|
74 w.white 1.1 */
|
75 aruran.ms 1.9 Boolean checkMessageIDandType(const String& messageID, Uint32 type);
|
76 w.white 1.1
|
77 kumpf 1.12 /** Sets the server time data member
|
78 w.white 1.1 */
|
79 w.white 1.7 void setServerTime(Uint32 time);
|
80 w.white 1.1
|
81 kumpf 1.12 /** Sets the responsSize data member
|
82 w.white 1.1 */
|
83 w.white 1.3 void setResponseSize(Uint64 size);
|
84 w.white 1.1
|
85 kumpf 1.12 /** Sets the _requestSize data member
|
86 w.white 1.1 */
|
87 w.white 1.3 void setRequestSize(Uint64 size);
|
88 w.white 1.1
|
89 kumpf 1.12 /** Sets startNetworkTime data member
|
90 w.white 1.1 */
|
91 kumpf 1.12 void setStartNetworkTime();
|
92 w.white 1.1
|
93 kumpf 1.12 /** Sets endNetworkTime data member
|
94 w.white 1.1 */
|
95 w.white 1.7 void setEndNetworkTime(TimeValue time);
|
96 w.white 1.1
|
97 kumpf 1.12 /** Sets validServerTime data member
|
98 w.white 1.1 */
|
99 w.white 1.3 void setServerTimeKnown(Boolean bol);
|
100 w.white 1.1
|
101 kumpf 1.12 /** Sets _operationType data member by translating message type given by
102 @param type, into a CIMOperationType. That value is used to set the
103 _operationType data member and is returned.
104 @param type integer repesenting the message type
|
105 w.white 1.1 */
|
106 w.white 1.3 void setOperationType(Uint32 type);
|
107 w.white 1.1
108 //void setErrorCondition(Boolean bol);
109
|
110 w.white 1.6 String toString() const;
|
111 w.white 1.1
112 void setMessageID(String messageID);
113
|
114 w.white 1.6 Boolean getStatError() const;
|
115 w.white 1.3
116 void setClassRegistered(Boolean bol);
117
118 static ClientPerfDataStore *current_Store;
119
|
120 kumpf 1.12 ClientOpPerformanceDataHandler* handler_prt;
|
121 w.white 1.3
|
122 w.white 1.6 Boolean isClassRegistered() const;
|
123 w.white 1.3
124 protected:
125 CIMOperationType _operationType;
126 Boolean _serverTimeKnown;
127 Boolean _errorCondition;
128 Boolean _classRegistered;
129 Uint64 _serverTime;
|
130 david.dillard 1.4 Uint64 _requestSize;
131 Uint64 _responseSize;
|
132 w.white 1.3 String _messID;
|
133 w.white 1.7 TimeValue _networkEndTime;
134 TimeValue _networkStartTime;
|
135 david.dillard 1.4
|
136 a.dunfey 1.10 private:
137 // Make copy-constructor and assignment operator private
138 ClientPerfDataStore(const ClientPerfDataStore & dataStore);
139 ClientPerfDataStore& operator=(const ClientPerfDataStore& dataStore);
|
140 david.dillard 1.4 };
141
|
142 w.white 1.1
143 PEGASUS_NAMESPACE_END
144
145 #endif /* ClientPerfDataStore_h */
146
|