"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManager.java" between
httpcomponents-client-5.2-src.tar.gz and httpcomponents-client-5.2.1-src.tar.gz

About: Apache HttpComponents Client provides reusable components for client-side authentication, HTTP state management, and HTTP connection management. Java sources.

PoolingAsyncClientConnectionManager.java  (httpcomponents-client-5.2-src):PoolingAsyncClientConnectionManager.java  (httpcomponents-client-5.2.1-src)
skipping to change at line 468 skipping to change at line 468
context, context,
new FutureCallback<ManagedAsyncClientConnection>() { new FutureCallback<ManagedAsyncClientConnection>() {
@Override @Override
public void completed(final ManagedAsyncClientConnection con nection) { public void completed(final ManagedAsyncClientConnection con nection) {
try { try {
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("{} connected {}", ConnPoolSupport.get Id(endpoint), ConnPoolSupport.getId(connection)); LOG.debug("{} connected {}", ConnPoolSupport.get Id(endpoint), ConnPoolSupport.getId(connection));
} }
final ProtocolVersion protocolVersion = connection.g etProtocolVersion(); final ProtocolVersion protocolVersion = connection.g etProtocolVersion();
context.setProtocolVersion(protocolVersion);
final Timeout socketTimeout = connectionConfig.getSo cketTimeout(); final Timeout socketTimeout = connectionConfig.getSo cketTimeout();
if (socketTimeout != null) { if (socketTimeout != null) {
connection.setSocketTimeout(socketTimeout); connection.setSocketTimeout(socketTimeout);
} }
poolEntry.assignConnection(connection); poolEntry.assignConnection(connection);
resultFuture.completed(internalEndpoint); resultFuture.completed(internalEndpoint);
} catch (final RuntimeException ex) { } catch (final RuntimeException ex) {
resultFuture.failed(ex); resultFuture.failed(ex);
} }
} }
skipping to change at line 524 skipping to change at line 523
public void completed(final ManagedAsyncClientConnection con nection) { public void completed(final ManagedAsyncClientConnection con nection) {
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("{} upgraded {}", ConnPoolSupport.getId(in ternalEndpoint), ConnPoolSupport.getId(connection)); LOG.debug("{} upgraded {}", ConnPoolSupport.getId(in ternalEndpoint), ConnPoolSupport.getId(connection));
} }
final TlsDetails tlsDetails = connection.getTlsDetails() ; final TlsDetails tlsDetails = connection.getTlsDetails() ;
if (tlsDetails != null && ApplicationProtocol.HTTP_2.id. equals(tlsDetails.getApplicationProtocol())) { if (tlsDetails != null && ApplicationProtocol.HTTP_2.id. equals(tlsDetails.getApplicationProtocol())) {
connection.switchProtocol(ApplicationProtocol.HTTP_2 .id, new CallbackContribution<ProtocolIOSession>(callback) { connection.switchProtocol(ApplicationProtocol.HTTP_2 .id, new CallbackContribution<ProtocolIOSession>(callback) {
@Override @Override
public void completed(final ProtocolIOSession pr otocolIOSession) { public void completed(final ProtocolIOSession pr otocolIOSession) {
context.setProtocolVersion(HttpVersion.HTTP_ 2);
if (callback != null) { if (callback != null) {
callback.completed(endpoint); callback.completed(endpoint);
} }
} }
}); });
} else { } else {
if (callback != null) { if (callback != null) {
callback.completed(endpoint); callback.completed(endpoint);
} }
skipping to change at line 753 skipping to change at line 751
@Override @Override
public void execute( public void execute(
final String exchangeId, final String exchangeId,
final AsyncClientExchangeHandler exchangeHandler, final AsyncClientExchangeHandler exchangeHandler,
final HandlerFactory<AsyncPushConsumer> pushHandlerFactory, final HandlerFactory<AsyncPushConsumer> pushHandlerFactory,
final HttpContext context) { final HttpContext context) {
final ManagedAsyncClientConnection connection = getValidatedPoolEntr y().getConnection(); final ManagedAsyncClientConnection connection = getValidatedPoolEntr y().getConnection();
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("{} executing exchange {} over {}", id, exchangeId, Co nnPoolSupport.getId(connection)); LOG.debug("{} executing exchange {} over {}", id, exchangeId, Co nnPoolSupport.getId(connection));
} }
context.setProtocolVersion(connection.getProtocolVersion());
connection.submitCommand( connection.submitCommand(
new RequestExecutionCommand(exchangeHandler, pushHandlerFact ory, context), new RequestExecutionCommand(exchangeHandler, pushHandlerFact ory, context),
Command.Priority.NORMAL); Command.Priority.NORMAL);
} }
} }
/** /**
* Method that can be called to determine whether the connection manager has been shut down and * Method that can be called to determine whether the connection manager has been shut down and
* is closed or not. * is closed or not.
 End of changes. 3 change blocks. 
2 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)