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