Examples of UpdateResource


Examples of com.google.speedtracer.client.model.ResourceUpdateEvent.UpdateResource

        Listener listener = listeners.get(i);
        listener.onNetworkResourceUpdated(resource);
      }
    } else {
      // We are dealing potentially with an update for a redirect.
      UpdateResource updateResource = update.getUpdate();
      NetworkResource redirectCandidate =
          findAndRemoveRedirectCandidate(update.getRequestId(), updateResource.getUrl());
      if (redirectCandidate != null) {
        redirectCandidate.update(update);
        redirectUpdated(redirectCandidate);
      }
    }
View Full Code Here

Examples of com.google.speedtracer.client.model.ResourceUpdateEvent.UpdateResource

   * 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();
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.