Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 41AAB200B55 for ; Sat, 25 Jun 2016 11:38:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 40203160A54; Sat, 25 Jun 2016 09:38:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4B902160A67 for ; Sat, 25 Jun 2016 11:38:03 +0200 (CEST) Received: (qmail 72663 invoked by uid 500); 25 Jun 2016 09:38:02 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 72654 invoked by uid 99); 25 Jun 2016 09:38:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2016 09:38:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 028A9C2477 for ; Sat, 25 Jun 2016 09:38:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.37 X-Spam-Level: X-Spam-Status: No, score=0.37 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.43] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Pe4GLZINOs0c for ; Sat, 25 Jun 2016 09:37:56 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTP id B5F565FE40 for ; Sat, 25 Jun 2016 09:37:54 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 208B9E59C8 for ; Sat, 25 Jun 2016 09:37:52 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 018A43A04BE for ; Sat, 25 Jun 2016 09:37:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1750192 [16/18] - in /httpcomponents/site/httpcomponents-asyncclient-4.1.x: ./ httpasyncclient-cache/ httpasyncclient-cache/apidocs/ httpasyncclient-cache/apidocs/org/apache/http/impl/client/cache/ httpasyncclient-cache/apidocs/org/apache/... Date: Sat, 25 Jun 2016 09:37:09 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160625093752.018A43A04BE@svn01-us-west.apache.org> archived-at: Sat, 25 Jun 2016 09:38:05 -0000 Modified: httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/CPoolProxy.html URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/CPoolProxy.html?rev=1750192&r1=1750191&r2=1750192&view=diff ============================================================================== --- httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/CPoolProxy.html (original) +++ httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/CPoolProxy.html Sat Jun 25 09:35:53 2016 @@ -45,249 +45,247 @@ 35 import org.apache.http.HttpException; 36 import org.apache.http.HttpRequest; 37 import org.apache.http.HttpResponse; -38 import org.apache.http.annotation.NotThreadSafe; -39 import org.apache.http.impl.conn.ConnectionShutdownException; -40 import org.apache.http.nio.NHttpClientConnection; -41 import org.apache.http.nio.conn.ManagedNHttpClientConnection; -42 import org.apache.http.nio.reactor.IOSession; -43 import org.apache.http.protocol.HttpContext; -44 -45 @NotThreadSafe -46 class CPoolProxy implements ManagedNHttpClientConnection { +38 import org.apache.http.impl.conn.ConnectionShutdownException; +39 import org.apache.http.nio.NHttpClientConnection; +40 import org.apache.http.nio.conn.ManagedNHttpClientConnection; +41 import org.apache.http.nio.reactor.IOSession; +42 import org.apache.http.protocol.HttpContext; +43 +44 class CPoolProxy implements ManagedNHttpClientConnection { +45 +46 private volatile CPoolEntry poolEntry; 47 -48 private volatile CPoolEntry poolEntry; -49 -50 CPoolProxy(final CPoolEntry entry) { -51 super(); -52 this.poolEntry = entry; -53 } -54 -55 CPoolEntry getPoolEntry() { -56 return this.poolEntry; -57 } -58 -59 CPoolEntry detach() { -60 final CPoolEntry local = this.poolEntry; -61 this.poolEntry = null; -62 return local; -63 } -64 -65 ManagedNHttpClientConnection getConnection() { -66 final CPoolEntry local = this.poolEntry; -67 if (local == null) { -68 return null; -69 } -70 return local.getConnection(); -71 } -72 -73 ManagedNHttpClientConnection getValidConnection() { -74 final ManagedNHttpClientConnection conn = getConnection(); -75 if (conn == null) { -76 throw new ConnectionShutdownException(); -77 } -78 return conn; -79 } -80 -81 @Override -82 public void close() throws IOException { -83 final CPoolEntry local = this.poolEntry; -84 if (local != null) { -85 local.closeConnection(); -86 } -87 } -88 -89 @Override -90 public void shutdown() throws IOException { -91 final CPoolEntry local = this.poolEntry; -92 if (local != null) { -93 local.shutdownConnection(); -94 } -95 } -96 -97 @Override -98 public HttpConnectionMetrics getMetrics() { -99 return getValidConnection().getMetrics(); -100 } -101 -102 @Override -103 public void requestInput() { -104 final NHttpClientConnection conn = getConnection(); -105 if (conn != null) { -106 conn.requestInput(); -107 } -108 } -109 -110 @Override -111 public void suspendInput() { -112 final NHttpClientConnection conn = getConnection(); -113 if (conn != null) { -114 conn.suspendInput(); -115 } -116 } -117 -118 @Override -119 public void requestOutput() { -120 final NHttpClientConnection conn = getConnection(); -121 if (conn != null) { -122 conn.requestOutput(); -123 } -124 } -125 -126 @Override -127 public void suspendOutput() { -128 final NHttpClientConnection conn = getConnection(); -129 if (conn != null) { -130 conn.suspendOutput(); -131 } -132 } -133 -134 @Override -135 public InetAddress getLocalAddress() { -136 return getValidConnection().getLocalAddress(); -137 } -138 -139 @Override -140 public int getLocalPort() { -141 return getValidConnection().getLocalPort(); -142 } -143 -144 @Override -145 public InetAddress getRemoteAddress() { -146 return getValidConnection().getRemoteAddress(); -147 } -148 -149 @Override -150 public int getRemotePort() { -151 return getValidConnection().getRemotePort(); -152 } -153 -154 @Override -155 public boolean isOpen() { -156 final CPoolEntry local = this.poolEntry; -157 if (local != null) { -158 return !local.isClosed(); -159 } else { -160 return false; -161 } -162 } -163 -164 @Override -165 public boolean isStale() { -166 final NHttpClientConnection conn = getConnection(); -167 if (conn != null) { -168 return !conn.isOpen(); -169 } else { -170 return false; -171 } -172 } -173 -174 @Override -175 public void setSocketTimeout(final int i) { -176 getValidConnection().setSocketTimeout(i); -177 } -178 -179 @Override -180 public int getSocketTimeout() { -181 return getValidConnection().getSocketTimeout(); -182 } -183 -184 @Override -185 public void submitRequest(final HttpRequest request) throws IOException, HttpException { -186 getValidConnection().submitRequest(request); -187 } -188 -189 @Override -190 public boolean isRequestSubmitted() { -191 return getValidConnection().isRequestSubmitted(); -192 } -193 -194 @Override -195 public void resetOutput() { -196 getValidConnection().resetOutput(); -197 } -198 -199 @Override -200 public void resetInput() { -201 getValidConnection().resetInput(); -202 } -203 -204 @Override -205 public int getStatus() { -206 return getValidConnection().getStatus(); -207 } -208 -209 @Override -210 public HttpRequest getHttpRequest() { -211 return getValidConnection().getHttpRequest(); -212 } -213 -214 @Override -215 public HttpResponse getHttpResponse() { -216 return getValidConnection().getHttpResponse(); -217 } -218 -219 @Override -220 public HttpContext getContext() { -221 return getValidConnection().getContext(); -222 } -223 -224 public static NHttpClientConnection newProxy(final CPoolEntry poolEntry) { -225 return new CPoolProxy(poolEntry); -226 } -227 -228 private static CPoolProxy getProxy(final NHttpClientConnection conn) { -229 if (!CPoolProxy.class.isInstance(conn)) { -230 throw new IllegalStateException("Unexpected connection proxy class: " + conn.getClass()); -231 } -232 return CPoolProxy.class.cast(conn); -233 } -234 -235 public static CPoolEntry getPoolEntry(final NHttpClientConnection proxy) { -236 final CPoolEntry entry = getProxy(proxy).getPoolEntry(); -237 if (entry == null) { -238 throw new ConnectionShutdownException(); -239 } -240 return entry; -241 } -242 -243 public static CPoolEntry detach(final NHttpClientConnection proxy) { -244 return getProxy(proxy).detach(); -245 } -246 -247 @Override -248 public String getId() { -249 return getValidConnection().getId(); -250 } -251 -252 @Override -253 public void bind(final IOSession iosession) { -254 getValidConnection().bind(iosession); -255 } -256 -257 @Override -258 public IOSession getIOSession() { -259 return getValidConnection().getIOSession(); -260 } -261 -262 @Override -263 public SSLSession getSSLSession() { -264 return getValidConnection().getSSLSession(); -265 } -266 -267 @Override -268 public String toString() { -269 final StringBuilder sb = new StringBuilder("CPoolProxy{"); -270 final ManagedNHttpClientConnection conn = getConnection(); -271 if (conn != null) { -272 sb.append(conn); -273 } else { -274 sb.append("detached"); -275 } -276 sb.append('}'); -277 return sb.toString(); -278 } -279 -280 } +48 CPoolProxy(final CPoolEntry entry) { +49 super(); +50 this.poolEntry = entry; +51 } +52 +53 CPoolEntry getPoolEntry() { +54 return this.poolEntry; +55 } +56 +57 CPoolEntry detach() { +58 final CPoolEntry local = this.poolEntry; +59 this.poolEntry = null; +60 return local; +61 } +62 +63 ManagedNHttpClientConnection getConnection() { +64 final CPoolEntry local = this.poolEntry; +65 if (local == null) { +66 return null; +67 } +68 return local.getConnection(); +69 } +70 +71 ManagedNHttpClientConnection getValidConnection() { +72 final ManagedNHttpClientConnection conn = getConnection(); +73 if (conn == null) { +74 throw new ConnectionShutdownException(); +75 } +76 return conn; +77 } +78 +79 @Override +80 public void close() throws IOException { +81 final CPoolEntry local = this.poolEntry; +82 if (local != null) { +83 local.closeConnection(); +84 } +85 } +86 +87 @Override +88 public void shutdown() throws IOException { +89 final CPoolEntry local = this.poolEntry; +90 if (local != null) { +91 local.shutdownConnection(); +92 } +93 } +94 +95 @Override +96 public HttpConnectionMetrics getMetrics() { +97 return getValidConnection().getMetrics(); +98 } +99 +100 @Override +101 public void requestInput() { +102 final NHttpClientConnection conn = getConnection(); +103 if (conn != null) { +104 conn.requestInput(); +105 } +106 } +107 +108 @Override +109 public void suspendInput() { +110 final NHttpClientConnection conn = getConnection(); +111 if (conn != null) { +112 conn.suspendInput(); +113 } +114 } +115 +116 @Override +117 public void requestOutput() { +118 final NHttpClientConnection conn = getConnection(); +119 if (conn != null) { +120 conn.requestOutput(); +121 } +122 } +123 +124 @Override +125 public void suspendOutput() { +126 final NHttpClientConnection conn = getConnection(); +127 if (conn != null) { +128 conn.suspendOutput(); +129 } +130 } +131 +132 @Override +133 public InetAddress getLocalAddress() { +134 return getValidConnection().getLocalAddress(); +135 } +136 +137 @Override +138 public int getLocalPort() { +139 return getValidConnection().getLocalPort(); +140 } +141 +142 @Override +143 public InetAddress getRemoteAddress() { +144 return getValidConnection().getRemoteAddress(); +145 } +146 +147 @Override +148 public int getRemotePort() { +149 return getValidConnection().getRemotePort(); +150 } +151 +152 @Override +153 public boolean isOpen() { +154 final CPoolEntry local = this.poolEntry; +155 if (local != null) { +156 return !local.isClosed(); +157 } else { +158 return false; +159 } +160 } +161 +162 @Override +163 public boolean isStale() { +164 final NHttpClientConnection conn = getConnection(); +165 if (conn != null) { +166 return !conn.isOpen(); +167 } else { +168 return false; +169 } +170 } +171 +172 @Override +173 public void setSocketTimeout(final int i) { +174 getValidConnection().setSocketTimeout(i); +175 } +176 +177 @Override +178 public int getSocketTimeout() { +179 return getValidConnection().getSocketTimeout(); +180 } +181 +182 @Override +183 public void submitRequest(final HttpRequest request) throws IOException, HttpException { +184 getValidConnection().submitRequest(request); +185 } +186 +187 @Override +188 public boolean isRequestSubmitted() { +189 return getValidConnection().isRequestSubmitted(); +190 } +191 +192 @Override +193 public void resetOutput() { +194 getValidConnection().resetOutput(); +195 } +196 +197 @Override +198 public void resetInput() { +199 getValidConnection().resetInput(); +200 } +201 +202 @Override +203 public int getStatus() { +204 return getValidConnection().getStatus(); +205 } +206 +207 @Override +208 public HttpRequest getHttpRequest() { +209 return getValidConnection().getHttpRequest(); +210 } +211 +212 @Override +213 public HttpResponse getHttpResponse() { +214 return getValidConnection().getHttpResponse(); +215 } +216 +217 @Override +218 public HttpContext getContext() { +219 return getValidConnection().getContext(); +220 } +221 +222 public static NHttpClientConnection newProxy(final CPoolEntry poolEntry) { +223 return new CPoolProxy(poolEntry); +224 } +225 +226 private static CPoolProxy getProxy(final NHttpClientConnection conn) { +227 if (!CPoolProxy.class.isInstance(conn)) { +228 throw new IllegalStateException("Unexpected connection proxy class: " + conn.getClass()); +229 } +230 return CPoolProxy.class.cast(conn); +231 } +232 +233 public static CPoolEntry getPoolEntry(final NHttpClientConnection proxy) { +234 final CPoolEntry entry = getProxy(proxy).getPoolEntry(); +235 if (entry == null) { +236 throw new ConnectionShutdownException(); +237 } +238 return entry; +239 } +240 +241 public static CPoolEntry detach(final NHttpClientConnection proxy) { +242 return getProxy(proxy).detach(); +243 } +244 +245 @Override +246 public String getId() { +247 return getValidConnection().getId(); +248 } +249 +250 @Override +251 public void bind(final IOSession iosession) { +252 getValidConnection().bind(iosession); +253 } +254 +255 @Override +256 public IOSession getIOSession() { +257 return getValidConnection().getIOSession(); +258 } +259 +260 @Override +261 public SSLSession getSSLSession() { +262 return getValidConnection().getSSLSession(); +263 } +264 +265 @Override +266 public String toString() { +267 final StringBuilder sb = new StringBuilder("CPoolProxy{"); +268 final ManagedNHttpClientConnection conn = getConnection(); +269 if (conn != null) { +270 sb.append(conn); +271 } else { +272 sb.append("detached"); +273 } +274 sb.append('}'); +275 return sb.toString(); +276 } +277 +278 }
Modified: httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/DefaultHttpAsyncRoutePlanner.html URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/DefaultHttpAsyncRoutePlanner.html?rev=1750192&r1=1750191&r2=1750192&view=diff ============================================================================== --- httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/DefaultHttpAsyncRoutePlanner.html (original) +++ httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/DefaultHttpAsyncRoutePlanner.html Sat Jun 25 09:35:53 2016 @@ -87,7 +87,7 @@ 77 } 78 final InetAddress local = ConnRouteParams.getLocalAddress(request.getParams()); 79 final HttpHost proxy = ConnRouteParams.getDefaultProxy(request.getParams()); -80 AsyncScheme scheme; +80 final AsyncScheme scheme; 81 try { 82 final AsyncSchemeRegistry registry = getSchemeRegistry(context); 83 scheme = registry.getScheme(target); Modified: httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.html URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.html?rev=1750192&r1=1750191&r2=1750192&view=diff ============================================================================== --- httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.html (original) +++ httpcomponents/site/httpcomponents-asyncclient-4.1.x/httpasyncclient/xref/org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager.html Sat Jun 25 09:35:53 2016 @@ -223,7 +223,7 @@ 213 if (managedConn.isOpen()) { 214 entry.updateExpiry(keepalive, tunit != null ? tunit : TimeUnit.MILLISECONDS); 215 if (this.log.isDebugEnabled()) { -216 String s; +216 final String s; 217 if (keepalive > 0) { 218 s = "for " + keepalive + " " + tunit; 219 } else {