public class HttpClient extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected Authentication |
authentication |
protected static int |
DEFAULT_CONNECT_TIMEOUT_IN_SECONDS |
protected static int |
DEFAULT_READ_TIMEOUT_IN_SECONDS |
protected org.asynchttpclient.AsyncHttpClient |
httpClient |
protected URL |
url |
Modifier | Constructor and Description |
---|---|
protected |
HttpClient(String serviceUrl,
Authentication authentication,
io.netty.channel.EventLoopGroup eventLoopGroup,
boolean tlsAllowInsecureConnection,
String tlsTrustCertsFilePath) |
protected |
HttpClient(String serviceUrl,
Authentication authentication,
io.netty.channel.EventLoopGroup eventLoopGroup,
boolean tlsAllowInsecureConnection,
String tlsTrustCertsFilePath,
int connectTimeoutInSeconds,
int readTimeoutInSeconds) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
<T> CompletableFuture<T> |
get(String path,
Class<T> clazz) |
static String |
getPulsarClientVersion()
Looks for a file called pulsar-client-version.properties and returns the client version
|
protected static final int DEFAULT_CONNECT_TIMEOUT_IN_SECONDS
protected static final int DEFAULT_READ_TIMEOUT_IN_SECONDS
protected final org.asynchttpclient.AsyncHttpClient httpClient
protected volatile URL url
protected final Authentication authentication
protected HttpClient(String serviceUrl, Authentication authentication, io.netty.channel.EventLoopGroup eventLoopGroup, boolean tlsAllowInsecureConnection, String tlsTrustCertsFilePath) throws PulsarClientException
PulsarClientException
protected HttpClient(String serviceUrl, Authentication authentication, io.netty.channel.EventLoopGroup eventLoopGroup, boolean tlsAllowInsecureConnection, String tlsTrustCertsFilePath, int connectTimeoutInSeconds, int readTimeoutInSeconds) throws PulsarClientException
PulsarClientException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public <T> CompletableFuture<T> get(String path, Class<T> clazz)
public static String getPulsarClientVersion()
Copyright © 2017–2018 Apache Software Foundation. All rights reserved.