Add constructor to better align with 10.0.x

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2020-05-13 14:10:10 +02:00
parent e7aa3c2e23
commit 7d80c8fc39
2 changed files with 13 additions and 2 deletions

View File

@ -163,7 +163,7 @@ public class HttpClient extends ContainerLifeCycle
*/
public HttpClient()
{
this(null);
this(new HttpClientTransportOverHTTP(), null);
}
/**
@ -178,6 +178,18 @@ public class HttpClient extends ContainerLifeCycle
this(new HttpClientTransportOverHTTP(), sslContextFactory);
}
/**
* Creates a {@link HttpClient} instance that can perform requests to non-TLS destinations only
* (that is, requests with the "http" scheme only, and not "https").
*
* @param transport the {@link HttpClientTransport}
* @see #HttpClient(HttpClientTransport, SslContextFactory) to perform requests to TLS destinations.
*/
public HttpClient(HttpClientTransport transport)
{
this(transport, null);
}
public HttpClient(HttpClientTransport transport, SslContextFactory sslContextFactory)
{
this.transport = transport;

View File

@ -44,7 +44,6 @@ public class BlockheadClient extends HttpClient implements WebSocketContainerSco
public BlockheadClient()
{
super(null);
setName("Blockhead-CLIENT");
this.extensionFactory = new WebSocketExtensionFactory(this);
}