Class DiscoveryClientConfig
- java.lang.Object
-
- software.amazon.awssdk.iot.discovery.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 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
software.amazon.awssdk.crt.io.ClientBootstrap
getBootstrap()
ExecutorService
getDiscoveryExecutor()
String
getGGServerName()
int
getMaxConnections()
software.amazon.awssdk.crt.http.HttpProxyOptions
getProxyOptions()
String
getRegion()
software.amazon.awssdk.crt.io.SocketOptions
getSocketOptions()
software.amazon.awssdk.crt.io.TlsContext
getTlsContext()
DiscoveryClientConfig
setDiscoveryExecutor(ExecutorService override)
Sets the executor that is used when calling discover().
-
-
-
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 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 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
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-