Class SslContextAutoRefreshBuilder<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      T get()
      It updates SSLContext at every configured refresh time and returns updated SSLContext.
      protected abstract T getSslContext()
      Returns cached SSLContext.
      protected abstract boolean needUpdate()
      Returns whether the key files modified after a refresh time, and context need update.
      protected abstract T update()
      updates and returns cached SSLContext.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • refreshTime

        protected final long refreshTime
      • lastRefreshTime

        protected long lastRefreshTime
    • Constructor Detail

      • SslContextAutoRefreshBuilder

        public SslContextAutoRefreshBuilder​(long certRefreshInSec)
    • Method Detail

      • update

        protected abstract T update()
                             throws java.security.GeneralSecurityException,
                                    java.io.IOException
        updates and returns cached SSLContext.
        Returns:
        Throws:
        java.security.GeneralSecurityException
        java.io.IOException
      • getSslContext

        protected abstract T getSslContext()
        Returns cached SSLContext.
        Returns:
      • needUpdate

        protected abstract boolean needUpdate()
        Returns whether the key files modified after a refresh time, and context need update.
        Returns:
        true if files modified
      • get

        public T get()
        It updates SSLContext at every configured refresh time and returns updated SSLContext.
        Returns: