ClientConfiguration Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. device. ClientConfiguration
- com.
public class ClientConfiguration
Configuration settings for an IoT Hub client. Validates all user-defined settings.
Field Summary
Modifier and Type | Field and Description |
---|---|
final int | DEFAULT_AMQP_OPEN_AUTHENTICATION_SESSION_TIMEOUT_IN_SECONDS |
final int | DEFAULT_AMQP_OPEN_DEVICE_SESSIONS_TIMEOUT_IN_SECONDS |
final int | DEFAULT_KEEP_ALIVE_INTERVAL_IN_SECONDS |
Constructor Summary
Constructor | Description | |
---|---|---|
ClientConfiguration() |
Method Summary
Modifier and Type | Method and Description |
---|---|
Iot |
getAuthenticationProvider() |
Client |
getAuthenticationType()
Getter for AuthenticationType |
String | getDeviceClientUniqueIdentifier() |
String |
getDeviceId()
Getter for the device ID. |
Message |
getDeviceTelemetryMessageCallback(String inputName)
Getter for the message callback. |
Object |
getDeviceTelemetryMessageContext(String inputName)
Getter for the context to be passed in to the message callback. |
Message |
getDeviceTwinMessageCallback()
Getter for the device twin message callback. |
Object |
getDeviceTwinMessageContext()
Getter for the context to be passed in to the device twin message callback. |
Message |
getDirectMethodsMessageCallback()
Getter for the device twin message callback. |
Object |
getDirectMethodsMessageContext()
Getter for the context to be passed in to the device twin message callback. |
String |
getGatewayHostname()
Getter for the Gateway host name. |
String |
getIotHubHostname()
Getter for the IoT Hub hostname. |
String |
getIotHubName()
Getter for the IoT Hub name. |
int |
getMessageLockTimeoutSecs()
Getter for the timeout, in seconds, for the lock that the client has on a received message. |
String | getModuleId() |
Iot |
getSasTokenAuthentication()
Getter for SasTokenAuthentication |
boolean |
isUsingWebsocket()
Getter for Websocket |
void |
setDeviceTwinMessageCallback(MessageCallback callback, Object context)
Setter for the device twin message callback. |
void |
setDirectMethodsMessageCallback(MessageCallback callback, Object context)
Setter for the device method message callback. |
Field Details
DEFAULT_AMQP_OPEN_AUTHENTICATION_SESSION_TIMEOUT_IN_SECONDS
public static final int DEFAULT_AMQP_OPEN_AUTHENTICATION_SESSION_TIMEOUT_IN_SECONDS= 20
DEFAULT_AMQP_OPEN_DEVICE_SESSIONS_TIMEOUT_IN_SECONDS
public static final int DEFAULT_AMQP_OPEN_DEVICE_SESSIONS_TIMEOUT_IN_SECONDS= 60
DEFAULT_KEEP_ALIVE_INTERVAL_IN_SECONDS
public static final int DEFAULT_KEEP_ALIVE_INTERVAL_IN_SECONDS= 230
Constructor Details
ClientConfiguration
protected ClientConfiguration()
Method Details
getAuthenticationProvider
public IotHubAuthenticationProvider getAuthenticationProvider()
getAuthenticationType
public AuthType getAuthenticationType()
Getter for AuthenticationType
Returns:
getDeviceClientUniqueIdentifier
public String getDeviceClientUniqueIdentifier()
getDeviceId
public String getDeviceId()
Getter for the device ID.
Returns:
getDeviceTelemetryMessageCallback
public MessageCallback getDeviceTelemetryMessageCallback(String inputName)
Getter for the message callback.
Parameters:
Returns:
getDeviceTelemetryMessageContext
public Object getDeviceTelemetryMessageContext(String inputName)
Getter for the context to be passed in to the message callback.
Parameters:
Returns:
getDeviceTwinMessageCallback
public MessageCallback getDeviceTwinMessageCallback()
Getter for the device twin message callback.
Returns:
getDeviceTwinMessageContext
public Object getDeviceTwinMessageContext()
Getter for the context to be passed in to the device twin message callback.
Returns:
getDirectMethodsMessageCallback
public MessageCallback getDirectMethodsMessageCallback()
Getter for the device twin message callback.
Returns:
getDirectMethodsMessageContext
public Object getDirectMethodsMessageContext()
Getter for the context to be passed in to the device twin message callback.
Returns:
getGatewayHostname
public String getGatewayHostname()
Getter for the Gateway host name.
Returns:
getIotHubHostname
public String getIotHubHostname()
Getter for the IoT Hub hostname.
Returns:
getIotHubName
public String getIotHubName()
Getter for the IoT Hub name.
Returns:
getMessageLockTimeoutSecs
public int getMessageLockTimeoutSecs()
Getter for the timeout, in seconds, for the lock that the client has on a received message.
Returns:
getModuleId
public String getModuleId()
getSasTokenAuthentication
public IotHubSasTokenAuthenticationProvider getSasTokenAuthentication()
Getter for SasTokenAuthentication
Returns:
isUsingWebsocket
public boolean isUsingWebsocket()
Getter for Websocket
Returns:
setDeviceTwinMessageCallback
public void setDeviceTwinMessageCallback(MessageCallback callback, Object context)
Setter for the device twin message callback.
Parameters:
setDirectMethodsMessageCallback
public void setDirectMethodsMessageCallback(MessageCallback callback, Object context)
Setter for the device method message callback.
Parameters:
Applies to
Azure SDK for Java