1 23 package com.sun.appserv.management.ext.wsmgmt; 24 25 import java.util.Map ; 26 import java.util.HashMap ; 27 import java.io.Serializable ; 28 29 import com.sun.appserv.management.base.XTypes; 30 import com.sun.appserv.management.base.MapCapable; 31 import com.sun.appserv.management.base.MapCapableBase; 32 33 38 public final class MessageTraceImpl extends MapCapableBase 39 implements MessageTrace { 40 41 44 public MessageTraceImpl( 45 final Map <String ,Serializable > m, 46 final String className) { 47 super(m, className); 48 } 49 50 55 public MessageTraceImpl(String id, String className) { 56 super(null, className); 57 putField(MESSAGE_ID,id ); 58 } 59 60 65 public MessageTraceImpl(String id) { 66 super( null, MessageTrace.CLASS_NAME); 67 putField(MESSAGE_ID,id ); 68 } 69 70 protected boolean validate() { 71 return (true); 72 } 73 74 80 public int getRequestSize() { 81 return getInteger(REQUEST_SIZE).intValue(); 82 } 83 84 public void setRequestSize(int reqSize) { 85 putField(REQUEST_SIZE, new Integer (reqSize)); 86 } 87 88 94 public int getResponseSize() { 95 return getInteger(RESPONSE_SIZE).intValue(); 96 } 97 98 public void setResponseSize(int resSize) { 99 putField(RESPONSE_SIZE, new Integer (resSize)); 100 } 101 102 107 public String getRequestContent() { 108 return getString(REQUEST_CONTENT); 109 } 110 111 public void setRequestContent(String reqContent) { 112 putField(REQUEST_CONTENT, reqContent); 113 } 114 115 120 public String getResponseContent() { 121 return getString(RESPONSE_CONTENT); 122 } 123 124 public void setResponseContent(String resContent) { 125 putField(RESPONSE_CONTENT, resContent); 126 } 127 128 133 public String getTransportType() { 134 return getString(TRANSPORT_TYPE); 135 } 136 137 public void setTransportType(String transport) { 138 putField(TRANSPORT_TYPE, transport); 139 } 140 141 147 public String getHTTPRequestHeaders() { 148 return getString(HTTP_REQUEST_HEADERS); 149 } 150 151 public void setHTTPRequestHeaders(String reqHeaders) { 152 putField(HTTP_REQUEST_HEADERS, reqHeaders); 153 } 154 155 161 public String getHTTPResponseHeaders() { 162 return getString(HTTP_RESPONSE_HEADERS); 163 } 164 165 public void setHTTPResponseHeaders(String resHeaders) { 166 putField(HTTP_RESPONSE_HEADERS, resHeaders); 167 } 168 169 174 public String getClientHost() { 175 return getString(CLIENT_HOST); 176 } 177 178 public void setClientHost(String clientHost) { 179 putField(CLIENT_HOST,clientHost ); 180 } 181 182 187 public String getPrincipalName() { 188 return getString(PRINCIPAL_NAME); 189 } 190 191 public void setPrincipalName(String principal) { 192 putField(PRINCIPAL_NAME, principal); 193 } 194 195 201 public long getResponseTime() { 202 return new Long (getString(RESPONSE_TIME)).longValue(); 203 } 204 205 public void setResponseTime(long resTime) { 206 putField(RESPONSE_TIME, new Long (resTime).toString()); 207 } 208 209 214 public String getFaultCode() { 215 return getString(FAULT_CODE); 216 } 217 218 public void setFaultCode(String faultCode) { 219 putField(FAULT_CODE, faultCode); 220 } 221 222 227 public String getFaultString() { 228 return getString(FAULT_STRING); 229 } 230 231 public void setFaultString(String faultString) { 232 putField(FAULT_STRING, faultString); 233 } 234 235 240 public String getFaultActor() { 241 return getString(FAULT_ACTOR); 242 } 243 244 public void setFaultActor(String faultActor) { 245 putField(FAULT_ACTOR,faultActor ); 246 } 247 248 253 public String getMessageID() { 254 return getString(MESSAGE_ID); 255 } 256 257 262 public String getApplicationID() { 263 return getString(APPLICATION_ID); 264 } 265 266 public void setApplicationID(String id) { 267 putField(APPLICATION_ID,id ); 268 } 269 270 273 public String getEndpointName() { 274 return getString(ENDPOINT_NAME); 275 } 276 277 public void setEndpointName(String name) { 278 putField(ENDPOINT_NAME, name); 279 } 280 281 286 public long getTimestamp() { 287 return new Long (getString(TIME_STAMP)).longValue(); 288 } 289 290 297 public boolean isCallFlowEnabled() { 298 return new Boolean (getString(CALL_FLOW_ENABLED)).booleanValue(); 299 } 300 301 305 public void setCallFlowEnabled(boolean enabled) { 306 putField(CALL_FLOW_ENABLED, new Boolean (enabled).toString()); 307 } 308 309 314 public void setTimeStamp(long ts) { 315 putField(TIME_STAMP, new Long (ts).toString()); 316 } 317 318 319 static final String REQUEST_SIZE = "RequestSize"; 320 321 322 static final String RESPONSE_SIZE = "ResponseSize"; 323 324 325 static final String RESPONSE_CONTENT = "ResponseContent"; 326 327 328 static final String REQUEST_CONTENT = "RequestContent"; 329 330 331 static final String TRANSPORT_TYPE = "TransportType"; 332 333 334 static final String HTTP_REQUEST_HEADERS = "HTTPRequestHeaders"; 335 336 337 static final String HTTP_RESPONSE_HEADERS = "HTTPResponseHeaders"; 338 339 340 static final String CLIENT_HOST = "ClientHost"; 341 342 343 static final String PRINCIPAL_NAME = "PrincipalName"; 344 345 346 static final String RESPONSE_TIME = "ResponseTime"; 347 348 349 static final String FAULT_CODE = "FaultCode"; 350 351 352 static final String FAULT_STRING = "FaultString"; 353 354 355 static final String FAULT_ACTOR = "FaultActor"; 356 357 358 static final String MESSAGE_ID = "MessageID"; 359 360 361 static final String APPLICATION_ID = "ApplicationID"; 362 363 364 static final String ENDPOINT_NAME = "EndpointName"; 365 366 367 static final String TIME_STAMP = "Timestamp"; 368 369 370 static final String CALL_FLOW_ENABLED = "CallFlowEnabled"; 371 } 372 | Popular Tags |