"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalH2AsyncExecRuntime.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.

InternalH2AsyncExecRuntime.java  (httpcomponents-client-5.2-src):InternalH2AsyncExecRuntime.java  (httpcomponents-client-5.2.1-src)
skipping to change at line 105 skipping to change at line 105
return Operations.cancellable(connPool.getSession(target, connectTim eout, return Operations.cancellable(connPool.getSession(target, connectTim eout,
new FutureCallback<IOSession>() { new FutureCallback<IOSession>() {
@Override @Override
public void completed(final IOSession ioSession) { public void completed(final IOSession ioSession) {
sessionRef.set(new Endpoint(target, ioSession)); sessionRef.set(new Endpoint(target, ioSession));
reusable = true; reusable = true;
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("{} acquired endpoint", id); log.debug("{} acquired endpoint", id);
} }
context.setProtocolVersion(HttpVersion.HTTP_2);
callback.completed(InternalH2AsyncExecRuntime.this); callback.completed(InternalH2AsyncExecRuntime.this);
} }
@Override @Override
public void failed(final Exception ex) { public void failed(final Exception ex) {
callback.failed(ex); callback.failed(ex);
} }
@Override @Override
public void cancelled() { public void cancelled() {
skipping to change at line 239 skipping to change at line 238
public Cancellable execute( public Cancellable execute(
final String id, final String id,
final AsyncClientExchangeHandler exchangeHandler, final HttpClientCo ntext context) { final AsyncClientExchangeHandler exchangeHandler, final HttpClientCo ntext context) {
final ComplexCancellable complexCancellable = new ComplexCancellable(); final ComplexCancellable complexCancellable = new ComplexCancellable();
final Endpoint endpoint = ensureValid(); final Endpoint endpoint = ensureValid();
final IOSession session = endpoint.session; final IOSession session = endpoint.session;
if (session.isOpen()) { if (session.isOpen()) {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("{} start execution {}", ConnPoolSupport.getId(endpoin t), id); log.debug("{} start execution {}", ConnPoolSupport.getId(endpoin t), id);
} }
context.setProtocolVersion(HttpVersion.HTTP_2);
session.enqueue( session.enqueue(
new RequestExecutionCommand(exchangeHandler, pushHandlerFact ory, complexCancellable, context), new RequestExecutionCommand(exchangeHandler, pushHandlerFact ory, complexCancellable, context),
Command.Priority.NORMAL); Command.Priority.NORMAL);
} else { } else {
final HttpHost target = endpoint.target; final HttpHost target = endpoint.target;
final RequestConfig requestConfig = context.getRequestConfig(); final RequestConfig requestConfig = context.getRequestConfig();
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
final Timeout connectTimeout = requestConfig.getConnectTimeout(); final Timeout connectTimeout = requestConfig.getConnectTimeout();
connPool.getSession(target, connectTimeout, new FutureCallback<IOSes sion>() { connPool.getSession(target, connectTimeout, new FutureCallback<IOSes sion>() {
@Override @Override
public void completed(final IOSession ioSession) { public void completed(final IOSession ioSession) {
sessionRef.set(new Endpoint(target, ioSession)); sessionRef.set(new Endpoint(target, ioSession));
reusable = true; reusable = true;
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("{} start execution {}", ConnPoolSupport.getId (endpoint), id); log.debug("{} start execution {}", ConnPoolSupport.getId (endpoint), id);
} }
context.setProtocolVersion(HttpVersion.HTTP_2);
session.enqueue( session.enqueue(
new RequestExecutionCommand(exchangeHandler, pushHan dlerFactory, complexCancellable, context), new RequestExecutionCommand(exchangeHandler, pushHan dlerFactory, complexCancellable, context),
Command.Priority.NORMAL); Command.Priority.NORMAL);
} }
@Override @Override
public void failed(final Exception ex) { public void failed(final Exception ex) {
exchangeHandler.failed(ex); exchangeHandler.failed(ex);
} }
 End of changes. 3 change blocks. 
1 lines changed or deleted 2 lines changed or added

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