Class AwsIotWebsocketConnection
java.lang.Object
com.amazonaws.services.iot.client.core.AwsIotConnection
com.amazonaws.services.iot.client.mqtt.AwsIotMqttConnection
com.amazonaws.services.iot.client.core.AwsIotWebsocketConnection
- All Implemented Interfaces:
AwsIotConnectionCallback
This is a thin layer on top of
AwsIotMqttConnection that provides a
WebSocket based communication channel to the MQTT implementation.-
Field Summary
Fields inherited from class com.amazonaws.services.iot.client.core.AwsIotConnection
client, connectionStatus -
Constructor Summary
ConstructorsConstructorDescriptionAwsIotWebsocketConnection(AbstractAwsIotClient client, CredentialsProvider provider, String region) AwsIotWebsocketConnection(AbstractAwsIotClient client, String awsAccessKeyId, String awsSecretAccessKey) AwsIotWebsocketConnection(AbstractAwsIotClient client, String awsAccessKeyId, String awsSecretAccessKey, String sessionToken) AwsIotWebsocketConnection(AbstractAwsIotClient client, String awsAccessKeyId, String awsSecretAccessKey, String sessionToken, String region) -
Method Summary
Modifier and TypeMethodDescriptionvoidupdateCredentials(String awsAccessKeyId, String awsSecretAccessKey, String sessionToken) Updates credentials for the connection, which will be used for new connections.Methods inherited from class com.amazonaws.services.iot.client.mqtt.AwsIotMqttConnection
closeConnection, getClientListener, getMessageListener, getMqttClient, getSocketFactory, openConnection, publishMessage, setClientListener, setMessageListener, setMqttClient, subscribeTopic, unsubscribeTopicMethods inherited from class com.amazonaws.services.iot.client.core.AwsIotConnection
connect, disconnect, getClient, getConnectCallback, getConnectionStatus, getPublishQueue, getRetryTask, getRetryTimes, getSubscribeQueue, getUnsubscribeQueue, isUserDisconnect, onConnectionClosed, onConnectionFailure, onConnectionSuccess, publish, setConnectionStatus, subscribe, unsubscribe
-
Constructor Details
-
AwsIotWebsocketConnection
public AwsIotWebsocketConnection(AbstractAwsIotClient client, String awsAccessKeyId, String awsSecretAccessKey) throws AWSIotException - Throws:
AWSIotException
-
AwsIotWebsocketConnection
public AwsIotWebsocketConnection(AbstractAwsIotClient client, String awsAccessKeyId, String awsSecretAccessKey, String sessionToken, String region) throws AWSIotException - Throws:
AWSIotException
-
AwsIotWebsocketConnection
public AwsIotWebsocketConnection(AbstractAwsIotClient client, String awsAccessKeyId, String awsSecretAccessKey, String sessionToken) throws AWSIotException - Throws:
AWSIotException
-
AwsIotWebsocketConnection
public AwsIotWebsocketConnection(AbstractAwsIotClient client, CredentialsProvider provider, String region) throws AWSIotException - Throws:
AWSIotException
-
-
Method Details
-
updateCredentials
public void updateCredentials(String awsAccessKeyId, String awsSecretAccessKey, String sessionToken) Description copied from class:AwsIotConnectionUpdates credentials for the connection, which will be used for new connections.- Overrides:
updateCredentialsin classAwsIotConnection- Parameters:
awsAccessKeyId- the AWS access key idawsSecretAccessKey- the AWS secret access keysessionToken- Session token received along with the temporary credentials from services like STS server, AssumeRole, or Amazon Cognito.
-
getServerUris
- Overrides:
getServerUrisin classAwsIotMqttConnection
-