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
public class AwsIotWebsocketConnection extends AwsIotMqttConnection
This is a thin layer on top ofAwsIotMqttConnectionthat 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
Constructors Constructor Description AwsIotWebsocketConnection(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getServerUris()voidupdateCredentials(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, unsubscribeTopic
-
Methods 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 Detail
-
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 Detail
-
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
public Set<String> getServerUris()
- Overrides:
getServerUrisin classAwsIotMqttConnection
-
-