@InterfaceAudience.Private @InterfaceStability.Evolving public final class ReloadingX509TrustManager extends Object implements X509TrustManager, Runnable
TrustManager implementation that reloads its configuration when
the truststore file on disk changes.| Constructor and Description |
|---|
ReloadingX509TrustManager(String type,
String location,
String password,
long reloadInterval)
Creates a reloadable trustmanager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(X509Certificate[] chain,
String authType) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType) |
void |
destroy()
Stops the reloader thread.
|
X509Certificate[] |
getAcceptedIssuers() |
long |
getReloadInterval()
Returns the reload check interval.
|
void |
init()
Starts the reloader thread.
|
void |
run() |
public ReloadingX509TrustManager(String type, String location, String password, long reloadInterval) throws IOException, GeneralSecurityException
type - type of truststore file, typically 'jks'.location - local path to the truststore file.password - password of the truststore file.reloadInterval - interval to check if the truststore file has
changed, in milliseconds.IOException - thrown if the truststore could not be initialized due
to an IO error.GeneralSecurityException - thrown if the truststore could not be
initialized due to a security error.public void init()
public void destroy()
public long getReloadInterval()
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted in interface X509TrustManagerCertificateExceptionpublic void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkServerTrusted in interface X509TrustManagerCertificateExceptionpublic X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface X509TrustManagerCopyright © 2013 Apache Software Foundation. All rights reserved.