* the timing information present in these updates.
*
* @param updateEvent
*/
public void update(ResourceUpdateEvent updateEvent) {
UpdateResource update = updateEvent.getUpdate();
if (update.didRequestChange()) {
this.requestHeaders = update.getRequestHeaders();
}
if (update.didResponseChange()) {
this.responseHeaders = update.getResponseHeaders();
this.cached = update.wasCached();
this.connectionID = update.getConnectionID();
this.connectionReused = update.getConnectionReused();
if (this.statusCode < 0) {
this.statusCode = update.getStatusCode();
this.statusText = update.getStatusText();
}
DetailedResponseTiming detailedTiming = update.getDetailedResponseTiming();
if (detailedTiming != null) {
this.hasDetailedTiming = true;
this.requestTime = detailedTiming.getRequestTime();
this.proxyDuration = detailedTiming.getProxyDuration();
this.dnsDuration = detailedTiming.getDnsDuration();
this.connectDuration = detailedTiming.getConnectDuration();
this.sendDuration = detailedTiming.getSendDuration();
this.sslDuration = detailedTiming.getSslDuration();
}
}
if (update.didLengthChange()) {
this.dataLength = update.getContentLength();
}
if (update.didTimingChange()) {
if ((Double.isNaN(this.endTime)) && (update.getEndTime() > 0)) {
this.endTime = update.getEndTime();
}
if ((Double.isNaN(this.responseReceivedTime))
&& (update.getResponseReceivedTime() > 0)) {
this.responseReceivedTime = update.getResponseReceivedTime();
}
}
}