Class ClientBase
- java.lang.Object
-
- com.yahoo.vespa.athenz.client.common.ClientBase
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
DefaultZmsClient
,DefaultZtsClient
public abstract class ClientBase extends java.lang.Object implements java.lang.AutoCloseable
- Author:
- bjorncs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
ClientBase.ClientExceptionFactory
-
Constructor Summary
Constructors Modifier Constructor Description protected
ClientBase(java.lang.String userAgent, java.util.function.Supplier<javax.net.ssl.SSLContext> sslContextSupplier, ClientBase.ClientExceptionFactory exceptionFactory, javax.net.ssl.HostnameVerifier hostnameVerifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected <T> T
execute(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.client.ResponseHandler<T> responseHandler)
protected <T> T
readEntity(org.apache.http.HttpResponse response, java.lang.Class<T> entityType)
protected org.apache.http.entity.StringEntity
toJsonStringEntity(java.lang.Object entity)
-
-
-
Constructor Detail
-
ClientBase
protected ClientBase(java.lang.String userAgent, java.util.function.Supplier<javax.net.ssl.SSLContext> sslContextSupplier, ClientBase.ClientExceptionFactory exceptionFactory, javax.net.ssl.HostnameVerifier hostnameVerifier)
-
-
Method Detail
-
execute
protected <T> T execute(org.apache.http.client.methods.HttpUriRequest request, org.apache.http.client.ResponseHandler<T> responseHandler)
-
toJsonStringEntity
protected org.apache.http.entity.StringEntity toJsonStringEntity(java.lang.Object entity)
-
readEntity
protected <T> T readEntity(org.apache.http.HttpResponse response, java.lang.Class<T> entityType) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-