Class SslContextProvider

  • All Implemented Interfaces:
    Closeable, java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    DynamicSslContextProvider

    @Internal
    public abstract class SslContextProvider
    extends java.lang.Object
    implements Closeable
    A SslContextProvider is a "container" or provider of SslContext. This is used by gRPC-xds to obtain an SslContext, so is not part of the public API of gRPC. This "container" may represent a stream that is receiving the requested secret(s) or it could represent file-system based secret(s) that are dynamic.
    • Method Detail

      • setClientAuthValues

        protected void setClientAuthValues​(io.netty.handler.ssl.SslContextBuilder sslContextBuilder,
                                           XdsTrustManagerFactory xdsTrustManagerFactory)
                                    throws java.security.cert.CertificateException,
                                           java.io.IOException,
                                           java.security.cert.CertStoreException
        Throws:
        java.security.cert.CertificateException
        java.io.IOException
        java.security.cert.CertStoreException
      • close

        public abstract void close()
        Closes this provider and releases any resources.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface java.io.Closeable
      • addCallback

        public abstract void addCallback​(SslContextProvider.Callback callback)
        Registers a callback on the given executor. The callback will run when SslContext becomes available or immediately if the result is already available.