Added missing #disconnectEndpoint method to AsyncConnectExec
This commit is contained in:
parent
8a2b0f584a
commit
a46c9e5656
|
@ -106,6 +106,11 @@ public interface AsyncExecRuntime {
|
||||||
HttpClientContext context,
|
HttpClientContext context,
|
||||||
FutureCallback<AsyncExecRuntime> callback);
|
FutureCallback<AsyncExecRuntime> callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disconnects the local endpoint from the initial hop in the connection route.
|
||||||
|
*/
|
||||||
|
void disconnectEndpoint();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Upgrades transport security of the active connection by using the TLS security protocol.
|
* Upgrades transport security of the active connection by using the TLS security protocol.
|
||||||
*
|
*
|
||||||
|
|
|
@ -215,6 +215,14 @@ class InternalH2AsyncExecRuntime implements AsyncExecRuntime {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disconnectEndpoint() {
|
||||||
|
final Endpoint endpoint = sessionRef.get();
|
||||||
|
if (endpoint != null) {
|
||||||
|
endpoint.session.close(CloseMode.GRACEFUL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void upgradeTls(final HttpClientContext context) {
|
public void upgradeTls(final HttpClientContext context) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
|
|
|
@ -235,6 +235,14 @@ class InternalHttpAsyncExecRuntime implements AsyncExecRuntime {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disconnectEndpoint() {
|
||||||
|
final AsyncConnectionEndpoint endpoint = endpointRef.get();
|
||||||
|
if (endpoint != null) {
|
||||||
|
endpoint.close(CloseMode.GRACEFUL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void upgradeTls(final HttpClientContext context) {
|
public void upgradeTls(final HttpClientContext context) {
|
||||||
upgradeTls(context, null);
|
upgradeTls(context, null);
|
||||||
|
|
Loading…
Reference in New Issue