public abstract class AutoRebuildSslContextProvider extends Object implements SslContextProvider
SslContextProvider with a
WatchService to auto-rebuild SSLContext when certificates
modified.| Modifier | Constructor and Description |
|---|---|
protected |
AutoRebuildSslContextProvider(SslContextProvider factory,
Path dir,
Collection<String> watchingFiles)
Constructs a new
AutoRebuildSslContextProvider with the specified
directory Path and watching files given. |
protected |
AutoRebuildSslContextProvider(SslContextProvider factory,
Path dir,
String... watchingFiles)
Constructs a new
AutoRebuildSslContextProvider with the specified
directory Path and watching files given. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this provider and releases any system resources associated with it.
|
io.netty.handler.ssl.SslContext |
get()
Returns the
SslContext instance. |
Path |
getDir()
Returns the
Path of the watching directory. |
boolean |
isClosed() |
Stream<Path> |
resolvedWatchingFiles()
Returns a
Stream contains the resolved path of each watching files. |
Set<String> |
watchingFiles()
Returns the set contains the name of each watching files.
|
protected AutoRebuildSslContextProvider(SslContextProvider factory, Path dir, Collection<String> watchingFiles) throws SSLRuntimeException, IOException
AutoRebuildSslContextProvider with the specified
directory Path and watching files given.factory - a factory to create SslContextsdir - the path of the parent directorywatchingFiles - the collection contains the name of each watching filesSSLRuntimeException - if any SSL error occursIOException - if an I/O error occursprotected AutoRebuildSslContextProvider(SslContextProvider factory, Path dir, String... watchingFiles) throws SSLRuntimeException, IOException
AutoRebuildSslContextProvider with the specified
directory Path and watching files given.factory - a factory to create SslContextsdir - the path of the parent directorywatchingFiles - the array contains the name of each watching filesSSLRuntimeException - if any SSL error occursIOException - if an I/O error occurspublic Path getDir()
Path of the watching directory.public Set<String> watchingFiles()
public Stream<Path> resolvedWatchingFiles()
Stream contains the resolved path of each watching files.Stream<Path>public io.netty.handler.ssl.SslContext get()
SslContextProviderSslContext instance.get in interface SslContextProviderget in interface Supplier<io.netty.handler.ssl.SslContext>SslContextpublic boolean isClosed()
public void close()
throws IOException
SslContextProviderclose in interface SslContextProviderclose in interface Closeableclose in interface AutoCloseableIOException - if an I/O error occursCopyright © 2020. All rights reserved.