Class AuthenticationDataTls

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.pulsar.client.api.AuthenticationDataProvider

    public class AuthenticationDataTls
    extends java.lang.Object
    implements org.apache.pulsar.client.api.AuthenticationDataProvider
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.security.cert.X509Certificate[] tlsCertificates  
      protected java.security.PrivateKey tlsPrivateKey  
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthenticationDataTls​(java.lang.String certFilePath, java.lang.String keyFilePath)  
      AuthenticationDataTls​(java.util.function.Supplier<java.io.ByteArrayInputStream> certStreamProvider, java.util.function.Supplier<java.io.ByteArrayInputStream> keyStreamProvider)  
      AuthenticationDataTls​(java.util.function.Supplier<java.io.ByteArrayInputStream> certStreamProvider, java.util.function.Supplier<java.io.ByteArrayInputStream> keyStreamProvider, java.util.function.Supplier<java.io.ByteArrayInputStream> trustStoreStreamProvider)  
    • Field Detail

      • tlsCertificates

        protected java.security.cert.X509Certificate[] tlsCertificates
      • tlsPrivateKey

        protected java.security.PrivateKey tlsPrivateKey
    • Constructor Detail

      • AuthenticationDataTls

        public AuthenticationDataTls​(java.lang.String certFilePath,
                                     java.lang.String keyFilePath)
                              throws java.security.KeyManagementException
        Throws:
        java.security.KeyManagementException
      • AuthenticationDataTls

        public AuthenticationDataTls​(java.util.function.Supplier<java.io.ByteArrayInputStream> certStreamProvider,
                                     java.util.function.Supplier<java.io.ByteArrayInputStream> keyStreamProvider)
                              throws java.security.KeyManagementException
        Throws:
        java.security.KeyManagementException
      • AuthenticationDataTls

        public AuthenticationDataTls​(java.util.function.Supplier<java.io.ByteArrayInputStream> certStreamProvider,
                                     java.util.function.Supplier<java.io.ByteArrayInputStream> keyStreamProvider,
                                     java.util.function.Supplier<java.io.ByteArrayInputStream> trustStoreStreamProvider)
                              throws java.security.KeyManagementException
        Throws:
        java.security.KeyManagementException
    • Method Detail

      • hasDataForTls

        public boolean hasDataForTls()
        Specified by:
        hasDataForTls in interface org.apache.pulsar.client.api.AuthenticationDataProvider
      • getTlsCertificates

        public java.security.cert.Certificate[] getTlsCertificates()
        Specified by:
        getTlsCertificates in interface org.apache.pulsar.client.api.AuthenticationDataProvider
      • getTlsPrivateKey

        public java.security.PrivateKey getTlsPrivateKey()
        Specified by:
        getTlsPrivateKey in interface org.apache.pulsar.client.api.AuthenticationDataProvider
      • getTlsTrustStoreStream

        public java.io.InputStream getTlsTrustStoreStream()
        Specified by:
        getTlsTrustStoreStream in interface org.apache.pulsar.client.api.AuthenticationDataProvider
      • getTlsCerificateFilePath

        public java.lang.String getTlsCerificateFilePath()
        Specified by:
        getTlsCerificateFilePath in interface org.apache.pulsar.client.api.AuthenticationDataProvider
      • getTlsPrivateKeyFilePath

        public java.lang.String getTlsPrivateKeyFilePath()
        Specified by:
        getTlsPrivateKeyFilePath in interface org.apache.pulsar.client.api.AuthenticationDataProvider