Class DiscoveryClientConfig
java.lang.Object
software.amazon.awssdk.iot.discovery.DiscoveryClientConfig
- All Implemented Interfaces:
AutoCloseable
Configuration object for the Greengrass discovery client
-
Constructor Summary
ConstructorsConstructorDescriptionDiscoveryClientConfig(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 regionsDiscoveryClientConfig(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 regionDiscoveryClientConfig(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. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()software.amazon.awssdk.crt.io.ClientBootstrapintsoftware.amazon.awssdk.crt.http.HttpProxyOptionssoftware.amazon.awssdk.crt.io.SocketOptionssoftware.amazon.awssdk.crt.io.TlsContextsetDiscoveryExecutor(ExecutorService override) Sets the executor that is used when calling discover().
-
Constructor Details
-
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 connectionstlsContextOptions- 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 connectionsregion- AWS region to query for greengrass informationmaxConnections- maximum concurrent http connections within the clientproxyOptions- 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 connectionsregion- AWS region to query for greengrass informationmaxConnections- maximum concurrent http connections within the clientproxyOptions- 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 connectionstlsContextOptions- 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 connectionsmaxConnections- maximum concurrent http connections within the clientproxyOptions- proxy configuration for client network connectionsggServerName- 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 connectionsmaxConnections- maximum concurrent http connections within the clientproxyOptions- proxy configuration for client network connectionsggServerName- full endpoint to use when connecting in special regions
-
-
Method Details
-
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
- 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
-
getDiscoveryExecutor
- Returns:
- the ExecutorService set for this discover client config. Returns null if one hasn't been set.
-
setDiscoveryExecutor
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
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-