Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: components/cronet/android/api/src/org/chromium/net/BidirectionalStream.java

Issue 1412243012: Initial implementation of CronetBidirectionalStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Little cleanup. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 import java.nio.ByteBuffer; 7 import java.nio.ByteBuffer;
8 import java.util.AbstractMap; 8 import java.util.AbstractMap;
9 import java.util.ArrayList; 9 import java.util.ArrayList;
10 import java.util.Map; 10 import java.util.Map;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 /** 77 /**
78 * Sets the HTTP method for the request. Returns builder to facilitate c haining. 78 * Sets the HTTP method for the request. Returns builder to facilitate c haining.
79 * 79 *
80 * @param method the method to use for request. Default is 'POST' 80 * @param method the method to use for request. Default is 'POST'
81 * @return the builder to facilitate chaining 81 * @return the builder to facilitate chaining
82 */ 82 */
83 public Builder setHttpMethod(String method) { 83 public Builder setHttpMethod(String method) {
84 if (method == null) { 84 if (method == null) {
85 throw new NullPointerException("Invalid method name."); 85 throw new NullPointerException("Method is required.");
86 } 86 }
87 mHttpMethod = method; 87 mHttpMethod = method;
88 return this; 88 return this;
89 } 89 }
90 90
91 /** 91 /**
92 * Adds a request header. Returns builder to facilitate chaining. 92 * Adds a request header. Returns builder to facilitate chaining.
93 * 93 *
94 * @param header the header name 94 * @param header the header name
95 * @param value the header value 95 * @param value the header value
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 /** 347 /**
348 * Returns {@code true} if the stream was successfully started and is now 348 * Returns {@code true} if the stream was successfully started and is now
349 * done (succeeded, canceled, or failed). 349 * done (succeeded, canceled, or failed).
350 * 350 *
351 * @return {@code true} if the stream was successfully started and is now 351 * @return {@code true} if the stream was successfully started and is now
352 * done (completed, canceled, or failed), otherwise returns {@code f alse} 352 * done (completed, canceled, or failed), otherwise returns {@code f alse}
353 * to indicate stream is not yet started or is in progress. 353 * to indicate stream is not yet started or is in progress.
354 */ 354 */
355 public abstract boolean isDone(); 355 public abstract boolean isDone();
356 } 356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698