harEntry.setStartedDateTime(new Date()); har.getLog().addEntry(harEntry);
/** * Creates a {@link HarEntry} for a failed CONNECT request. Initializes and populates the entry, including the * {@link HarRequest}, {@link HarResponse}, and {@link HarTimings}. (Note: only successful timing information is * populated in the timings object; the calling method must populate the timing information for the final, failed * step. For example, if DNS resolution failed, this method will populate the network 'blocked' time, but not the DNS * time.) Populates the specified errorMessage in the {@link HarResponse}'s error field. * * @param errorMessage error message to place in the har response * @return a new HAR entry */ private HarEntry createHarEntryForFailedCONNECT(String errorMessage) { HarEntry harEntry = new HarEntry(currentPageRef); harEntry.setStartedDateTime(requestStartTime); HarRequest request = createRequestForFailedConnect(originalRequest); harEntry.setRequest(request); HarResponse response = HarCaptureUtil.createHarResponseForFailure(); harEntry.setResponse(response); response.setError(errorMessage); populateTimingsForFailedCONNECT(harEntry); populateServerIpAddress(harEntry); return harEntry; }
harEntry.setStartedDateTime(new Date()); har.getLog().addEntry(harEntry);
/** * Creates a {@link HarEntry} for a failed CONNECT request. Initializes and populates the entry, including the * {@link HarRequest}, {@link HarResponse}, and {@link HarTimings}. (Note: only successful timing information is * populated in the timings object; the calling method must populate the timing information for the final, failed * step. For example, if DNS resolution failed, this method will populate the network 'blocked' time, but not the DNS * time.) Populates the specified errorMessage in the {@link HarResponse}'s error field. * * @param errorMessage error message to place in the har response * @return a new HAR entry */ private HarEntry createHarEntryForFailedCONNECT(String errorMessage) { HarEntry harEntry = new HarEntry(currentPageRef); harEntry.setStartedDateTime(requestStartTime); HarRequest request = createRequestForFailedConnect(originalRequest); harEntry.setRequest(request); HarResponse response = HarCaptureUtil.createHarResponseForFailure(); harEntry.setResponse(response); response.setError(errorMessage); populateTimingsForFailedCONNECT(harEntry); populateServerIpAddress(harEntry); return harEntry; }
/** * Creates a {@link HarEntry} for a failed CONNECT request. Initializes and populates the entry, including the * {@link HarRequest}, {@link HarResponse}, and {@link HarTimings}. (Note: only successful timing information is * populated in the timings object; the calling method must populate the timing information for the final, failed * step. For example, if DNS resolution failed, this method will populate the network 'blocked' time, but not the DNS * time.) Populates the specified errorMessage in the {@link HarResponse}'s error field. * * @param errorMessage error message to place in the har response * @return a new HAR entry */ private HarEntry createHarEntryForFailedCONNECT(String errorMessage) { HarEntry harEntry = new HarEntry(currentPageRef); harEntry.setStartedDateTime(requestStartTime); HarRequest request = createRequestForFailedConnect(originalRequest); harEntry.setRequest(request); HarResponse response = HarCaptureUtil.createHarResponseForFailure(); harEntry.setResponse(response); response.setError(errorMessage); populateTimingsForFailedCONNECT(harEntry); populateServerIpAddress(harEntry); return harEntry; }
/** * Creates a {@link HarEntry} for a failed CONNECT request. Initializes and populates the entry, including the * {@link HarRequest}, {@link HarResponse}, and {@link HarTimings}. (Note: only successful timing information is * populated in the timings object; the calling method must populate the timing information for the final, failed * step. For example, if DNS resolution failed, this method will populate the network 'blocked' time, but not the DNS * time.) Populates the specified errorMessage in the {@link HarResponse}'s error field. * * @param errorMessage error message to place in the har response * @return a new HAR entry */ private HarEntry createHarEntryForFailedCONNECT(String errorMessage) { HarEntry harEntry = new HarEntry(currentPageRef); harEntry.setStartedDateTime(requestStartTime); HarRequest request = createRequestForFailedConnect(originalRequest); harEntry.setRequest(request); HarResponse response = HarCaptureUtil.createHarResponseForFailure(); harEntry.setResponse(response); response.setError(errorMessage); populateTimingsForFailedCONNECT(harEntry); populateServerIpAddress(harEntry); return harEntry; }
harEntry.setStartedDateTime(new Date()); har.getLog().addEntry(harEntry);
harEntry.setStartedDateTime(new Date()); har.getLog().addEntry(harEntry);