Class AuthenticationTls

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Serializable, java.lang.AutoCloseable, org.apache.pulsar.client.api.Authentication, org.apache.pulsar.client.api.EncodedAuthenticationParameterSupport

    public class AuthenticationTls
    extends java.lang.Object
    implements org.apache.pulsar.client.api.Authentication, org.apache.pulsar.client.api.EncodedAuthenticationParameterSupport
    This plugin requires these parameters tlsCertFile: A file path for a client certificate. tlsKeyFile: A file path for a client private key.
    See Also:
    Serialized Form
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()  
      void configure​(java.lang.String encodedAuthParamString)  
      void configure​(java.util.Map<java.lang.String,​java.lang.String> authParams)
      Deprecated.
      org.apache.pulsar.client.api.AuthenticationDataProvider getAuthData()  
      java.lang.String getAuthMethodName()  
      java.lang.String getCertFilePath()  
      java.lang.String getKeyFilePath()  
      void start()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.pulsar.client.api.Authentication

        authenticationStage, getAuthData, newRequestHeader
    • Constructor Detail

      • AuthenticationTls

        public AuthenticationTls()
      • AuthenticationTls

        public AuthenticationTls​(java.lang.String certFilePath,
                                 java.lang.String keyFilePath)
      • AuthenticationTls

        public AuthenticationTls​(java.util.function.Supplier<java.io.ByteArrayInputStream> certStreamProvider,
                                 java.util.function.Supplier<java.io.ByteArrayInputStream> keyStreamProvider)
      • AuthenticationTls

        public AuthenticationTls​(java.util.function.Supplier<java.io.ByteArrayInputStream> certStreamProvider,
                                 java.util.function.Supplier<java.io.ByteArrayInputStream> keyStreamProvider,
                                 java.util.function.Supplier<java.io.ByteArrayInputStream> trustStoreStreamProvider)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getAuthMethodName

        public java.lang.String getAuthMethodName()
        Specified by:
        getAuthMethodName in interface org.apache.pulsar.client.api.Authentication
      • getAuthData

        public org.apache.pulsar.client.api.AuthenticationDataProvider getAuthData()
                                                                            throws org.apache.pulsar.client.api.PulsarClientException
        Specified by:
        getAuthData in interface org.apache.pulsar.client.api.Authentication
        Throws:
        org.apache.pulsar.client.api.PulsarClientException
      • configure

        public void configure​(java.lang.String encodedAuthParamString)
        Specified by:
        configure in interface org.apache.pulsar.client.api.EncodedAuthenticationParameterSupport
      • configure

        @Deprecated
        public void configure​(java.util.Map<java.lang.String,​java.lang.String> authParams)
        Deprecated.
        Specified by:
        configure in interface org.apache.pulsar.client.api.Authentication
      • start

        public void start()
                   throws org.apache.pulsar.client.api.PulsarClientException
        Specified by:
        start in interface org.apache.pulsar.client.api.Authentication
        Throws:
        org.apache.pulsar.client.api.PulsarClientException
      • getCertFilePath

        public java.lang.String getCertFilePath()
      • getKeyFilePath

        public java.lang.String getKeyFilePath()