1010import com .linkedin .parseq .Task ;
1111import com .linkedin .parseq .promise .Promises ;
1212import com .linkedin .parseq .promise .SettablePromise ;
13- import com .ning .http .client .AsyncHttpClient .BoundRequestBuilder ;
14- import com .ning .http .client .AsyncCompletionHandler ;
15- import com .ning .http .client .BodyGenerator ;
16- import com .ning .http .client .ConnectionPoolPartitioning ;
17- import com .ning .http .client .FluentCaseInsensitiveStringsMap ;
18- import com .ning .http .client .Param ;
19- import com .ning .http .client .ProxyServer ;
20- import com .ning .http .client .Realm ;
21- import com .ning .http .client .Request ;
22- import com .ning .http .client .Response ;
23- import com .ning .http .client .SignatureCalculator ;
24- import com .ning .http .client .cookie .Cookie ;
25- import com .ning .http .client .multipart .Part ;
26- import com .ning .http .client .uri .Uri ;
13+ import org .asynchttpclient .BoundRequestBuilder ;
14+
15+ import org .asynchttpclient .AsyncCompletionHandler ;
16+ import org .asynchttpclient .request .body .generator .BodyGenerator ;
17+ import org .asynchttpclient .channel .ChannelPoolPartitioning ;
18+ import io .netty .handler .codec .http .HttpHeaders ;
19+ import org .asynchttpclient .Param ;
20+ import org .asynchttpclient .proxy .ProxyServer ;
21+ import org .asynchttpclient .Realm ;
22+ import org .asynchttpclient .Request ;
23+ import org .asynchttpclient .Response ;
24+ import org .asynchttpclient .SignatureCalculator ;
25+ import io .netty .handler .codec .http .cookie .Cookie ;
26+ import org .asynchttpclient .request .body .multipart .Part ;
27+ import org .asynchttpclient .uri .Uri ;
2728
2829public class WrappedRequestBuilder {
2930
@@ -58,12 +59,12 @@ public WrappedRequestBuilder addBodyPart(Part part) {
5859 }
5960
6061 public WrappedRequestBuilder setInetAddress (InetAddress address ) {
61- _delegate .setInetAddress (address );
62+ _delegate .setAddress (address );
6263 return this ;
6364 }
6465
6566 public WrappedRequestBuilder setLocalInetAddress (InetAddress address ) {
66- _delegate .setLocalInetAddress (address );
67+ _delegate .setLocalAddress (address );
6768 return this ;
6869 }
6970
@@ -101,11 +102,6 @@ public WrappedRequestBuilder setBody(InputStream stream) {
101102 return this ;
102103 }
103104
104- public WrappedRequestBuilder setContentLength (int length ) {
105- _delegate .setContentLength (length );
106- return this ;
107- }
108-
109105 public WrappedRequestBuilder setBody (String data ) {
110106 _delegate .setBody (data );
111107 return this ;
@@ -121,7 +117,7 @@ public WrappedRequestBuilder setCookies(Collection<Cookie> cookies) {
121117 return this ;
122118 }
123119
124- public WrappedRequestBuilder setHeaders (FluentCaseInsensitiveStringsMap headers ) {
120+ public WrappedRequestBuilder setHeaders (HttpHeaders headers ) {
125121 _delegate .setHeaders (headers );
126122 return this ;
127123 }
@@ -222,7 +218,7 @@ public WrappedRequestBuilder setRealm(Realm realm) {
222218 }
223219
224220 public WrappedRequestBuilder setFollowRedirects (boolean followRedirects ) {
225- _delegate .setFollowRedirects (followRedirects );
221+ _delegate .setFollowRedirect (followRedirects );
226222 return this ;
227223 }
228224
@@ -241,13 +237,8 @@ public WrappedRequestBuilder setMethod(String method) {
241237 return this ;
242238 }
243239
244- public WrappedRequestBuilder setBodyEncoding (String charset ) {
245- _delegate .setBodyEncoding (charset );
246- return this ;
247- }
248-
249- public WrappedRequestBuilder setConnectionPoolKeyStrategy (ConnectionPoolPartitioning connectionPoolKeyStrategy ) {
250- _delegate .setConnectionPoolKeyStrategy (connectionPoolKeyStrategy );
240+ public WrappedRequestBuilder setConnectionPoolKeyStrategy (ChannelPoolPartitioning connectionPoolKeyStrategy ) {
241+ _delegate .setChannelPoolPartitioning (connectionPoolKeyStrategy );
251242 return this ;
252243 }
253244
@@ -257,7 +248,7 @@ public Task<Response> task(final String desc) {
257248 _delegate .execute (new AsyncCompletionHandler <Response >() {
258249
259250 @ Override
260- public Response onCompleted (final Response response ) throws Exception {
251+ public Response onCompleted (final Response response ) {
261252 result .done (response );
262253 return response ;
263254 }
0 commit comments