@Test(expectedExceptions = NullPointerException.class) public void ValidateResponseExpectsNonNullFingerprint() throws ProtocolException { STUB_CONTINUATOR.validateResponseWithMarker(null); }
void validateResponseWithMarker(final Pair<String, HttpRange.Response> responseFingerprint) throws ProtocolException { notNull(responseFingerprint, "Response fingerprint must not be null"); if (!this.marker.getEtag().equals(responseFingerprint.getLeft())) { throw new ProtocolException( String.format( "Response ETag mismatch: expected [%s], got [%s]", this.marker.getEtag(), responseFingerprint.getLeft())); } if (responseFingerprint.getRight() == null) { throw new ProtocolException( "Response missing Content-Range and Content-Length"); } try { this.marker.validateResponseRange(responseFingerprint.getRight()); } catch (final HttpException e) { throw new ProtocolException( "Response Content-Range mismatch: " + e.getMessage(), e); } }
ApacheHttpGetResponseEntityContentContinuator implements InputStreamContinuator { void validateResponseWithMarker(final Pair<String, HttpRange.Response> responseFingerprint) throws ProtocolException { notNull(responseFingerprint, "Response fingerprint must not be null"); if (!this.marker.getEtag().equals(responseFingerprint.getLeft())) { throw new ProtocolException( String.format( "Response ETag mismatch: expected [%s], got [%s]", this.marker.getEtag(), responseFingerprint.getLeft())); } if (responseFingerprint.getRight() == null) { throw new ProtocolException( "Response missing Content-Range and Content-Length"); } try { this.marker.validateResponseRange(responseFingerprint.getRight()); } catch (final HttpException e) { throw new ProtocolException( "Response Content-Range mismatch: " + e.getMessage(), e); } } }
ApacheHttpGetResponseEntityContentContinuator implements InputStreamContinuator { void validateResponseWithMarker(final Pair<String, HttpRange.Response> responseFingerprint) throws ProtocolException { notNull(responseFingerprint, "Response fingerprint must not be null"); if (!this.marker.getEtag().equals(responseFingerprint.getLeft())) { throw new ProtocolException( String.format( "Response ETag mismatch: expected [%s], got [%s]", this.marker.getEtag(), responseFingerprint.getLeft())); } if (responseFingerprint.getRight() == null) { throw new ProtocolException( "Response missing Content-Range and Content-Length"); } try { this.marker.validateResponseRange(responseFingerprint.getRight()); } catch (final HttpException e) { throw new ProtocolException( "Response Content-Range mismatch: " + e.getMessage(), e); } } ApacheHttpGetResponseEntityContentContinuator(final MantaApacheHttpClientContext connCtx,
                                                  final HttpGet request,
                                                  final HttpDownloadContinuationMarker marker,
                                                  final int maxContinuations);   ApacheHttpGetResponseEntityContentContinuator(final HttpClient client,
                                                  final HttpGet request,
                                                  final HttpDownloadContinuationMarker marker,
                                                  final int maxContinuations,
                                                  final MetricRegistry metricRegistry); }
ApacheHttpGetResponseEntityContentContinuator implements InputStreamContinuator { void validateResponseWithMarker(final Pair<String, HttpRange.Response> responseFingerprint) throws ProtocolException { notNull(responseFingerprint, "Response fingerprint must not be null"); if (!this.marker.getEtag().equals(responseFingerprint.getLeft())) { throw new ProtocolException( String.format( "Response ETag mismatch: expected [%s], got [%s]", this.marker.getEtag(), responseFingerprint.getLeft())); } if (responseFingerprint.getRight() == null) { throw new ProtocolException( "Response missing Content-Range and Content-Length"); } try { this.marker.validateResponseRange(responseFingerprint.getRight()); } catch (final HttpException e) { throw new ProtocolException( "Response Content-Range mismatch: " + e.getMessage(), e); } } ApacheHttpGetResponseEntityContentContinuator(final MantaApacheHttpClientContext connCtx,
                                                  final HttpGet request,
                                                  final HttpDownloadContinuationMarker marker,
                                                  final int maxContinuations);   ApacheHttpGetResponseEntityContentContinuator(final HttpClient client,
                                                  final HttpGet request,
                                                  final HttpDownloadContinuationMarker marker,
                                                  final int maxContinuations,
                                                  final MetricRegistry metricRegistry); @Override InputStream buildContinuation(final IOException ex, final long bytesRead); @Override void close(); }
ApacheHttpGetResponseEntityContentContinuator implements InputStreamContinuator { void validateResponseWithMarker(final Pair<String, HttpRange.Response> responseFingerprint) throws ProtocolException { notNull(responseFingerprint, "Response fingerprint must not be null"); if (!this.marker.getEtag().equals(responseFingerprint.getLeft())) { throw new ProtocolException( String.format( "Response ETag mismatch: expected [%s], got [%s]", this.marker.getEtag(), responseFingerprint.getLeft())); } if (responseFingerprint.getRight() == null) { throw new ProtocolException( "Response missing Content-Range and Content-Length"); } try { this.marker.validateResponseRange(responseFingerprint.getRight()); } catch (final HttpException e) { throw new ProtocolException( "Response Content-Range mismatch: " + e.getMessage(), e); } } ApacheHttpGetResponseEntityContentContinuator(final MantaApacheHttpClientContext connCtx,
                                                  final HttpGet request,
                                                  final HttpDownloadContinuationMarker marker,
                                                  final int maxContinuations);   ApacheHttpGetResponseEntityContentContinuator(final HttpClient client,
                                                  final HttpGet request,
                                                  final HttpDownloadContinuationMarker marker,
                                                  final int maxContinuations,
                                                  final MetricRegistry metricRegistry); @Override InputStream buildContinuation(final IOException ex, final long bytesRead); @Override void close();  }