1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 package org.metricshub.wbem.sblim.cimclient.internal.cimxml;
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 import java.util.Hashtable;
49 import org.w3c.dom.Document;
50
51
52
53
54 public class CIMMessage {
55 protected Document iDoc;
56
57 protected Hashtable<?, ?> iElements;
58
59 protected String iCimVersion;
60
61 protected String iDtdVersion;
62
63 protected String iId;
64
65 protected String iProtocolVersion;
66
67 protected String iMethod;
68
69 protected boolean iIsCIMExport = false;
70
71 protected boolean iIsSimple = false;
72
73 protected boolean iIsRequest = false;
74
75 protected CIMMessage() {
76
77 }
78
79
80
81
82
83
84
85
86
87 public CIMMessage(String pCimVersion, String pDtdVersion, String pId, String pMethod) {
88 this.iCimVersion = pCimVersion;
89 this.iDtdVersion = pDtdVersion;
90 this.iId = pId;
91 this.iMethod = pMethod;
92 }
93
94
95
96
97
98
99 public String getCIMVersion() {
100 return this.iCimVersion;
101 }
102
103
104
105
106
107
108 public String getDTDVersion() {
109 return this.iDtdVersion;
110 }
111
112
113
114
115
116
117 public boolean isCIMOperation() {
118 return !this.iIsCIMExport;
119 }
120
121
122
123
124
125
126 public boolean isCIMExport() {
127 return this.iIsCIMExport;
128 }
129
130
131
132
133
134
135 public void setId(String pId) {
136 this.iId = pId;
137 }
138
139
140
141
142
143
144 public void setMethod(String pMethod) {
145 this.iMethod = pMethod;
146 this.iIsCIMExport = (pMethod.toUpperCase().endsWith("EXPREQ") || pMethod.toUpperCase().endsWith("EXPRSP"));
147 this.iIsRequest = (pMethod.toUpperCase().endsWith("REQ"));
148 this.iIsSimple = pMethod.toUpperCase().startsWith("SIMPLE");
149 }
150
151
152
153
154
155
156 public void setCIMVersion(String pCimVersion) {
157 this.iCimVersion = pCimVersion;
158 }
159
160
161
162
163
164
165 public void setDTDVersion(String pDtdVersion) {
166 this.iDtdVersion = pDtdVersion;
167 }
168
169
170
171
172
173
174 public void setIsRequest(boolean pValue) {
175 this.iIsRequest = pValue;
176 }
177
178
179
180
181
182
183 public String getId() {
184 return this.iId;
185 }
186
187
188
189
190
191
192 public String getProtocolVersion() {
193 return this.iProtocolVersion;
194 }
195 }