Class DiscoveryClientConfig

  • All Implemented Interfaces:
    AutoCloseable

    public class DiscoveryClientConfig
    extends Object
    implements AutoCloseable
    Configuration object for the Greengrass discovery client
    • Constructor Summary

      Constructors 
      Constructor Description
      DiscoveryClientConfig​(software.amazon.awssdk.crt.io.ClientBootstrap bootstrap, software.amazon.awssdk.crt.io.TlsContextOptions tlsContextOptions, software.amazon.awssdk.crt.io.SocketOptions socketOptions, int maxConnections, software.amazon.awssdk.crt.http.HttpProxyOptions proxyOptions, String ggServerName)
      Default Constructor for DiscoveryClientConfig that allows the specification of a specific ggServerName to use in special regions
      DiscoveryClientConfig​(software.amazon.awssdk.crt.io.ClientBootstrap bootstrap, software.amazon.awssdk.crt.io.TlsContextOptions tlsContextOptions, software.amazon.awssdk.crt.io.SocketOptions socketOptions, String region, int maxConnections, software.amazon.awssdk.crt.http.HttpProxyOptions proxyOptions)
      Constructor for DiscoveryClientConfig creates the correct endpoint if not in a special region
      DiscoveryClientConfig​(software.amazon.awssdk.crt.io.TlsContextOptions tlsContextOptions, software.amazon.awssdk.crt.io.SocketOptions socketOptions, int maxConnections, software.amazon.awssdk.crt.http.HttpProxyOptions proxyOptions, String ggServerName)
      Default Constructor for DiscoveryClientConfig that allows the specification of a specific ggServerName to use in special regions using the static default client bootstrap.
      DiscoveryClientConfig​(software.amazon.awssdk.crt.io.TlsContextOptions tlsContextOptions, software.amazon.awssdk.crt.io.SocketOptions socketOptions, String region, int maxConnections, software.amazon.awssdk.crt.http.HttpProxyOptions proxyOptions)
      Constructor for DiscoveryClientConfig creates the correct endpoint if not in a special region using the default static bootstrap.
    • Constructor Detail

      • DiscoveryClientConfig

        public DiscoveryClientConfig​(software.amazon.awssdk.crt.io.ClientBootstrap bootstrap,
                                     software.amazon.awssdk.crt.io.TlsContextOptions tlsContextOptions,
                                     software.amazon.awssdk.crt.io.SocketOptions socketOptions,
                                     String region,
                                     int maxConnections,
                                     software.amazon.awssdk.crt.http.HttpProxyOptions proxyOptions)
        Constructor for DiscoveryClientConfig creates the correct endpoint if not in a special region
        Parameters:
        bootstrap - client bootstrap to use to establish network connections
        tlsContextOptions - tls configuration for client network connections. For greengrass discovery, the tls context must be initialized with the certificate and private key of the device/thing that is querying greengrass core availability.
        socketOptions - socket configuration for client network connections
        region - AWS region to query for greengrass information
        maxConnections - maximum concurrent http connections within the client
        proxyOptions - proxy configuration for client network connections
      • DiscoveryClientConfig

        public DiscoveryClientConfig​(software.amazon.awssdk.crt.io.TlsContextOptions tlsContextOptions,
                                     software.amazon.awssdk.crt.io.SocketOptions socketOptions,
                                     String region,
                                     int maxConnections,
                                     software.amazon.awssdk.crt.http.HttpProxyOptions proxyOptions)
        Constructor for DiscoveryClientConfig creates the correct endpoint if not in a special region using the default static bootstrap.
        Parameters:
        tlsContextOptions - tls configuration for client network connections. For greengrass discovery, the tls context must be initialized with the certificate and private key of the device/thing that is querying greengrass core availability.
        socketOptions - socket configuration for client network connections
        region - AWS region to query for greengrass information
        maxConnections - maximum concurrent http connections within the client
        proxyOptions - proxy configuration for client network connections
      • DiscoveryClientConfig

        public DiscoveryClientConfig​(software.amazon.awssdk.crt.io.ClientBootstrap bootstrap,
                                     software.amazon.awssdk.crt.io.TlsContextOptions tlsContextOptions,
                                     software.amazon.awssdk.crt.io.SocketOptions socketOptions,
                                     int maxConnections,
                                     software.amazon.awssdk.crt.http.HttpProxyOptions proxyOptions,
                                     String ggServerName)
        Default Constructor for DiscoveryClientConfig that allows the specification of a specific ggServerName to use in special regions
        Parameters:
        bootstrap - client bootstrap to use to establish network connections
        tlsContextOptions - tls configuration for client network connections. For greengrass discovery, the tls context must be initialized with the certificate and private key of the device/thing that is querying greengrass core availability.
        socketOptions - socket configuration for client network connections
        maxConnections - maximum concurrent http connections within the client
        proxyOptions - proxy configuration for client network connections
        ggServerName - full endpoint to use when connecting in special regions
      • DiscoveryClientConfig

        public DiscoveryClientConfig​(software.amazon.awssdk.crt.io.TlsContextOptions tlsContextOptions,
                                     software.amazon.awssdk.crt.io.SocketOptions socketOptions,
                                     int maxConnections,
                                     software.amazon.awssdk.crt.http.HttpProxyOptions proxyOptions,
                                     String ggServerName)
        Default Constructor for DiscoveryClientConfig that allows the specification of a specific ggServerName to use in special regions using the static default client bootstrap.
        Parameters:
        tlsContextOptions - tls configuration for client network connections. For greengrass discovery, the tls context must be initialized with the certificate and private key of the device/thing that is querying greengrass core availability.
        socketOptions - socket configuration for client network connections
        maxConnections - maximum concurrent http connections within the client
        proxyOptions - proxy configuration for client network connections
        ggServerName - full endpoint to use when connecting in special regions
    • Method Detail

      • getBootstrap

        public software.amazon.awssdk.crt.io.ClientBootstrap getBootstrap()
        Returns:
        client bootstrap to use to establish network connections
      • getTlsContext

        public software.amazon.awssdk.crt.io.TlsContext getTlsContext()
        Returns:
        tls configuration for client network connections
      • getSocketOptions

        public software.amazon.awssdk.crt.io.SocketOptions getSocketOptions()
        Returns:
        socket configuration for client network connections
      • getRegion

        public String getRegion()
        Returns:
        AWS region to query for greengrass information
      • getMaxConnections

        public int getMaxConnections()
        Returns:
        maximum concurrent http connections within the client
      • getProxyOptions

        public software.amazon.awssdk.crt.http.HttpProxyOptions getProxyOptions()
        Returns:
        proxy configuration for client network connections
      • getGGServerName

        public String getGGServerName()
      • getDiscoveryExecutor

        public ExecutorService getDiscoveryExecutor()
        Returns:
        the ExecutorService set for this discover client config. Returns null if one hasn't been set.
      • setDiscoveryExecutor

        public DiscoveryClientConfig setDiscoveryExecutor​(ExecutorService override)
        Sets the executor that is used when calling discover(). If set using this function, you are expected to close/shutdown the executor when finished with it. If it is not set, the discovery client will internally manage its own executor.
        Parameters:
        override - The executor to use
        Returns:
        The client config