public class KeyStoreScanner extends ContainerLifeCycle implements Scanner.DiscreteListener
The KeyStoreScanner
is used to monitor the KeyStore file used by the SslContextFactory
.
It will reload the SslContextFactory
if it detects that the KeyStore file has been modified.
If the TrustStore file needs to be changed, then this should be done before touching the KeyStore file,
the SslContextFactory.reload(Consumer)
will only occur after the KeyStore file has been modified.
AbstractLifeCycle.AbstractLifeCycleListener
Container.InheritedListener, Container.Listener
Dumpable.DumpableContainer
LifeCycle.Listener
Constructor and Description |
---|
KeyStoreScanner(SslContextFactory sslContextFactory) |
Modifier and Type | Method and Description |
---|---|
void |
fileAdded(java.lang.String filename) |
void |
fileChanged(java.lang.String filename) |
void |
fileRemoved(java.lang.String filename) |
int |
getScanInterval() |
void |
reload() |
void |
scan() |
void |
setScanInterval(int scanInterval) |
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isDumpable
dumpContainer, dumpIterable, dumpMapEntries, dumpObjects, dumpSelf, named
public KeyStoreScanner(SslContextFactory sslContextFactory)
public void fileAdded(java.lang.String filename)
fileAdded
in interface Scanner.DiscreteListener
public void fileChanged(java.lang.String filename)
fileChanged
in interface Scanner.DiscreteListener
public void fileRemoved(java.lang.String filename)
fileRemoved
in interface Scanner.DiscreteListener
@ManagedOperation(value="Scan for changes in the SSL Keystore", impact="ACTION") public void scan()
@ManagedOperation(value="Reload the SSL Keystore", impact="ACTION") public void reload()
@ManagedAttribute(value="scanning interval to detect changes which need reloaded") public int getScanInterval()
public void setScanInterval(int scanInterval)
Copyright © 1995–2021 Webtide. All rights reserved.