1 karl 1.2 //%2005////////////////////////////////////////////////////////////////////////
|
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 w.white 1.1 //
12 // Permission is hereby granted, free of charge, to any person obtaining a copy
13 // of this software and associated documentation files (the "Software"), to
14 // deal in the Software without restriction, including without limitation the
15 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 // sell copies of the Software, and to permit persons to whom the Software is
17 // furnished to do so, subject to the following conditions:
18 //
19 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //==============================================================================
28 //
|
29 w.white 1.3 // Author: Willis White (whiwill@us.ibm.com)
|
30 w.white 1.1 //
31 // Modified By:
32 //
33 //%/////////////////////////////////////////////////////////////////////////////
34
35 #ifndef ClientPerfDataStore_h
36 #define ClientPerfDataStore_h
37
38 #include <Pegasus/Common/CIMOperationType.h>
39 #include <Pegasus/Common/String.h>
40 #include <Pegasus/Common/CIMDateTime.h>
|
41 w.white 1.3 #include <Pegasus/Common/XmlWriter.h>
42 #include <Pegasus/Common/Message.h>
|
43 w.white 1.1 #include <Pegasus/Client/Linkage.h>
|
44 w.white 1.3 #include <Pegasus/Client/ClientOpPerformanceDataHandler.h>
|
45 w.white 1.1 #include <iostream>
46 #include <fstream>
47
48
|
49 w.white 1.3
50 PEGASUS_NAMESPACE_BEGIN;
51
|
52 w.white 1.1
|
53 w.white 1.3
54 struct ClientOpPerformanceDataHandler;
55 struct ClientOpPerformanceData;
56
57 /* The ClientPerfDataStore class is internal to pegasus. It has no API's that client apps can
58 access. It's purpose is to collect and calculate the data that is returned to the client app
59 in the ClientOpPerformanceData object.
|
60 w.white 1.1 */
61
|
62 w.white 1.3 class PEGASUS_CLIENT_LINKAGE ClientPerfDataStore
63
|
64 w.white 1.1 {
65 public:
66
|
67 w.white 1.3 static ClientPerfDataStore* Instance();
|
68 w.white 1.1
69 /**Resets all the data members to 0
70 */
71 void reset();
72
73 /**Creates a ClientOpPerformanceData from the current values of of the private data members
74 */
|
75 w.white 1.3 ClientOpPerformanceData createPerfDataStruct();
|
76 w.white 1.1
|
77 w.white 1.3 /**checks the currentMessageID and _operationType data members against
|
78 w.white 1.1 @param messageID and @param type if the values equea
79 true is returned.
80 @param messageID
|
81 w.white 1.3 @param type CIM message type of current message
|
82 w.white 1.1 @return true if @param messageID equals currentMessageID data member
83 */
|
84 w.white 1.3 Boolean checkMessageIDandType(String messageID, Uint32 type);
|
85 w.white 1.1
86 /**sets the server time data member
87 */
|
88 w.white 1.3 void setServerTime(Uint64 time);
|
89 w.white 1.1
90 /**sets the responsSize data member
91 */
|
92 w.white 1.3 void setResponseSize(Uint64 size);
|
93 w.white 1.1
|
94 w.white 1.3 /**sets the _requestSize data member
|
95 w.white 1.1 */
|
96 w.white 1.3 void setRequestSize(Uint64 size);
|
97 w.white 1.1
98 /**sets startNetworkTime data member
99 */
100 void setStartNetworkTime(void);
101
102 /**sets endNetworkTime data member
103 */
104 void setEndNetworkTime(CIMDateTime time);
105
106
107 /** sets validServerTime data member
108 */
|
109 w.white 1.3 void setServerTimeKnown(Boolean bol);
|
110 w.white 1.1
|
111 w.white 1.3 /**sets _operationType data member by translating message type given by
112 @param type, into a CIMOperationType. That value is ues to set the _operationType
|
113 w.white 1.1 data member and is returned.
114 @param type integer repesenting the message type
115 */
|
116 w.white 1.3 void setOperationType(Uint32 type);
|
117 w.white 1.1
118 //void setErrorCondition(Boolean bol);
119
120
|
121 w.white 1.3 String toString();
|
122 w.white 1.1
123 void setMessageID(String messageID);
124
|
125 w.white 1.3 Boolean getStatError();
126
127 void setClassRegistered(Boolean bol);
128
129 static ClientPerfDataStore *current_Store;
130
131 ClientOpPerformanceDataHandler * handler_prt;
132
133 Boolean isClassRegistered();
134
135
136 protected:
137 CIMOperationType _operationType;
138 Boolean _serverTimeKnown;
139 Boolean _errorCondition;
140 Boolean _classRegistered;
141 Uint64 _serverTime;
142 Uint64 _requestSize;
143 Uint64 _responseSize;
144 String _messID;
145 CIMDateTime _networkEndTime;
146 w.white 1.3 CIMDateTime _networkStartTime;
147
148
149
|
150 w.white 1.1
|
151 w.white 1.3 //using the singleton pattern - constructors are made un-usealbe
152 ClientPerfDataStore();
153 ClientPerfDataStore(const ClientPerfDataStore&);
154 ClientPerfDataStore& operator= (const ClientPerfDataStore&);
|
155 w.white 1.1
156 };
157
158
159 PEGASUS_NAMESPACE_END
160
161 #endif /* ClientPerfDataStore_h */
162
|