| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * {@link BidirectionalStream} that exposes experimental features. | 8 * {@link BidirectionalStream} that exposes experimental features. |
| 9 * Created using {@link Builder}. Every instance of {@link BidirectionalStream}
can be casted | 9 * Created using {@link Builder}. Every instance of {@link BidirectionalStream}
can be casted |
| 10 * to an instance of this class. | 10 * to an instance of this class. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 public abstract static class Builder extends BidirectionalStream.Builder { | 21 public abstract static class Builder extends BidirectionalStream.Builder { |
| 22 /** | 22 /** |
| 23 * Associates the annotation object with this request. May add more than
one. | 23 * Associates the annotation object with this request. May add more than
one. |
| 24 * Passed through to a {@link RequestFinishedInfo.Listener}, | 24 * Passed through to a {@link RequestFinishedInfo.Listener}, |
| 25 * see {@link RequestFinishedInfo#getAnnotations}. | 25 * see {@link RequestFinishedInfo#getAnnotations}. |
| 26 * | 26 * |
| 27 * @param annotation an object to pass on to the {@link RequestFinishedI
nfo.Listener} with a | 27 * @param annotation an object to pass on to the {@link RequestFinishedI
nfo.Listener} with a |
| 28 * {@link RequestFinishedInfo}. | 28 * {@link RequestFinishedInfo}. |
| 29 * @return the builder to facilitate chaining. | 29 * @return the builder to facilitate chaining. |
| 30 */ | 30 */ |
| 31 public abstract Builder addRequestAnnotation(Object annotation); | 31 public Builder addRequestAnnotation(Object annotation) { |
| 32 return this; |
| 33 } |
| 32 | 34 |
| 33 // To support method chaining, override superclass methods to return an | 35 // To support method chaining, override superclass methods to return an |
| 34 // instance of this class instead of the parent. | 36 // instance of this class instead of the parent. |
| 35 | 37 |
| 36 @Override | 38 @Override |
| 37 public abstract Builder setHttpMethod(String method); | 39 public abstract Builder setHttpMethod(String method); |
| 38 | 40 |
| 39 @Override | 41 @Override |
| 40 public abstract Builder addHeader(String header, String value); | 42 public abstract Builder addHeader(String header, String value); |
| 41 | 43 |
| 42 @Override | 44 @Override |
| 43 public abstract Builder setPriority(int priority); | 45 public abstract Builder setPriority(int priority); |
| 44 | 46 |
| 45 @Override | 47 @Override |
| 46 public abstract Builder delayRequestHeadersUntilFirstFlush( | 48 public abstract Builder delayRequestHeadersUntilFirstFlush( |
| 47 boolean delayRequestHeadersUntilFirstFlush); | 49 boolean delayRequestHeadersUntilFirstFlush); |
| 48 | 50 |
| 49 @Override | 51 @Override |
| 50 public abstract ExperimentalBidirectionalStream build(); | 52 public abstract ExperimentalBidirectionalStream build(); |
| 51 } | 53 } |
| 52 } | 54 } |
| OLD | NEW |