Class X509CredentialsProvider.X509CredentialsProviderBuilder

  • Enclosing class:
    X509CredentialsProvider

    public static class X509CredentialsProvider.X509CredentialsProviderBuilder
    extends java.lang.Object
    A builder class for the 509 provider and its options
    • Constructor Detail

      • X509CredentialsProviderBuilder

        public X509CredentialsProviderBuilder()
        Default constructor
    • Method Detail

      • withClientBootstrap

        public X509CredentialsProvider.X509CredentialsProviderBuilder withClientBootstrap​(ClientBootstrap clientBootstrap)
        Sets the client bootstrap (host resolver and event loop group) to use when making the connections required by this provider.
        Parameters:
        clientBootstrap - client bootstrap to use
        Returns:
        The current builder
      • withTlsContext

        public X509CredentialsProvider.X509CredentialsProviderBuilder withTlsContext​(TlsContext tlsContext)
        Sets the tls context initialized with a x509 certificate and private key suitable for queries against the account's iot credential provider endpoint
        Parameters:
        tlsContext - the tls context to use when establishing the http connection to iot
        Returns:
        The current builder
      • withEndpoint

        public X509CredentialsProvider.X509CredentialsProviderBuilder withEndpoint​(java.lang.String endpoint)
        Sets the endpoint to fetch credentials from. This is a per-account value that can be determined via the cli: 'aws iot describe-endpoint --endpoint-type iot:CredentialProvider'
        Parameters:
        endpoint - credentials provider endpoint
        Returns:
        The current builder
      • withProxyOptions

        public X509CredentialsProvider.X509CredentialsProviderBuilder withProxyOptions​(HttpProxyOptions proxyOptions)
        Sets the proxy configuration to use when making the http request that fetches session credentials from the IoT x509 credentials provider service
        Parameters:
        proxyOptions - proxy configuration for the credentials fetching http request
        Returns:
        The current builder
      • build

        public X509CredentialsProvider build()
        Creates a new X509 credentials provider, based on this builder's configuration
        Returns:
        a new X509 credentials provider