Modifier and Type | Class and Description |
---|---|
static class |
VerifyingHTTPClientFactory.X509TrustManagerFacade
A facade for trust managers.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CONNECTION_TIMEOUT
The default amount of time a connection should wait before timing out.
|
Constructor and Description |
---|
VerifyingHTTPClientFactory(MyLoggingFacade logger,
SSLConfiguration sslConfiguration) |
Modifier and Type | Method and Description |
---|---|
void |
debug(String x)
Write a debug message to the log.
|
void |
error(String x)
Write an error message to the log.
|
org.apache.http.client.HttpClient |
getClient(String host)
Creates an HTTPS-aware client that will verify the cert chain and host when called.
|
org.apache.http.client.HttpClient |
getClient(String host,
int connectionTimeout,
int socketTimeout) |
org.apache.http.client.HttpClient |
getClient(X509TrustManager x509TrustManager) |
org.apache.http.client.HttpClient |
getClient(X509TrustManager x509TrustManager,
int connectionTimeout,
int socketTimeout) |
protected KeyManagerFactory |
getKeyManagerFactory() |
protected KeyManager[] |
getKeyManagers() |
protected KeyStore |
getKeyStore() |
MyLoggingFacade |
getLogger() |
protected org.apache.http.conn.ssl.SSLSocketFactory |
getSocketFactory(X509TrustManager tm)
Configure the socket factory using an SSL context.
|
SSLConfiguration |
getSSLConfiguration() |
boolean |
hasKeyStore() |
void |
info(String x)
Write an informational message to the log
|
boolean |
isDebugOn()
Query if debugging is enabled for this logger.
|
boolean |
isStrictHostnames()
Whether to allow strict hostname verification.
|
MyTrustManager |
newMyTrustManager()
Returns a NEW trust manager with each call since the trust manager needs to have its host set.
|
void |
setDebugOn(boolean setOn)
Enable/disable debugging for this logger
|
protected void |
setKeyManagerFactory(KeyManagerFactory keyManagerFactory) |
protected void |
setKeyStore(KeyStore keyStore) |
void |
setSSLConfiguration(SSLConfiguration sslConfiguration) |
void |
setStrictHostnames(boolean strictHostnames) |
void |
warn(String x)
Write a warning to the log.
|
public static int DEFAULT_CONNECTION_TIMEOUT
public VerifyingHTTPClientFactory(MyLoggingFacade logger, SSLConfiguration sslConfiguration)
public boolean isStrictHostnames()
public void setStrictHostnames(boolean strictHostnames)
public void debug(String x)
Logable
public boolean isDebugOn()
Logable
public void setDebugOn(boolean setOn)
Logable
setDebugOn
in interface Logable
public void info(String x)
Logable
public void warn(String x)
Logable
public void error(String x)
Logable
public MyLoggingFacade getLogger()
public org.apache.http.client.HttpClient getClient(String host) throws IOException
host
- IOException
public org.apache.http.client.HttpClient getClient(String host, int connectionTimeout, int socketTimeout) throws IOException
IOException
public org.apache.http.client.HttpClient getClient(X509TrustManager x509TrustManager)
public org.apache.http.client.HttpClient getClient(X509TrustManager x509TrustManager, int connectionTimeout, int socketTimeout)
protected org.apache.http.conn.ssl.SSLSocketFactory getSocketFactory(X509TrustManager tm) throws IOException, GeneralSecurityException
tm
- IOException
KeyStoreException
GeneralSecurityException
public boolean hasKeyStore()
public MyTrustManager newMyTrustManager() throws IOException
IOException
protected KeyManagerFactory getKeyManagerFactory() throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
protected KeyStore getKeyStore() throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
protected void setKeyStore(KeyStore keyStore)
protected void setKeyManagerFactory(KeyManagerFactory keyManagerFactory)
protected KeyManager[] getKeyManagers() throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public SSLConfiguration getSSLConfiguration()
public void setSSLConfiguration(SSLConfiguration sslConfiguration)
Copyright © 2019. All Rights Reserved.