public interface IEsfMqttCloudClient extends IEsfMqttClient
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE_NAME
Reports the class name representing this interface.
|
Modifier and Type | Method and Description |
---|---|
int |
controlSubscribe(java.lang.String assetId,
java.lang.String topic,
int qos)
Subscribes to a control topic with the MQtt broker.
|
void |
disableConnectionLostTimeout()
Disables the connection lost timeout option.
|
void |
enableConnectionLostTimeout(long timeout)
Enables the connection lost timeout option within the client.
|
java.lang.String |
getAssetId()
Returns the Asset ID of the device
|
int |
publish(java.lang.String assetId,
java.lang.String semanticTopic,
byte[] payload,
int qos,
boolean retain)
Publishes a message to the MQtt broker.
|
int |
subscribe(java.lang.String assetId,
com.eurotech.cloud.message.EdcSubscription subscription)
Subscribes to a topic with the MQtt broker.
|
int |
subscribe(java.lang.String assetId,
com.eurotech.cloud.message.EdcSubscription[] subscriptions)
Subscribes to one or more topics with the MQtt broker.
|
int |
subscribe(java.lang.String assetId,
java.lang.String topic,
int qos)
Subscribes to a topic with the MQtt broker.
|
int |
unsubscribe(java.lang.String assetId,
com.eurotech.cloud.message.EdcSubscription subscription)
Unsubscribes from a topic with the MQtt broker.
|
int |
unsubscribe(java.lang.String assetId,
java.lang.String topic)
Unsubscribes from a topic with the MQtt broker.
|
getClientId, getPassword, getSubscriptions, getUsername, getWillMessage, getWillQos, getWillTopic, isConnected, publish, registerCallback, setBrokerUrl, setCleanStart, setClientId, setKeepAlive, setPassword, setUsername, startSession, subscribe, subscribe, subscribe, terminateSession, unsubscribe, unsubscribe
static final java.lang.String SERVICE_NAME
int publish(java.lang.String assetId, java.lang.String semanticTopic, byte[] payload, int qos, boolean retain) throws EsfMqttException
assetId
- A String specifying the asset ID.semanticTopic
- A String specifying the semantic topic the message was published on.payload
- An array of bytes containing the payload of the message.qos
- An integer specifying the quality of service the message was published on.retain
- Whether or not the broker should retain the messageEsfMqttException
int subscribe(java.lang.String assetId, com.eurotech.cloud.message.EdcSubscription[] subscriptions) throws EsfMqttException
assetId
- A String specifying the asset ID.subscriptions
- An array of EdcSubscription objects.EsfMqttException
int subscribe(java.lang.String assetId, com.eurotech.cloud.message.EdcSubscription subscription) throws EsfMqttException
assetId
- A String specifying the asset ID.subscription
- An EdcSubscription object.EsfMqttException
int subscribe(java.lang.String assetId, java.lang.String topic, int qos) throws EsfMqttException
assetId
- A String specifying the asset ID.topic
- A String object containing the topic.qos
- An int containing the Quality of Service.EsfMqttException
int controlSubscribe(java.lang.String assetId, java.lang.String topic, int qos) throws EsfMqttException
assetId
- A String specifying the asset ID.topic
- A String object containing the topic.qos
- An int containing the Quality of Service.EsfMqttException
int unsubscribe(java.lang.String assetId, com.eurotech.cloud.message.EdcSubscription subscription) throws EsfMqttException
assetId
- A String specifying the asset ID.subscription
- A EdcSubscription object containing the topic.EsfMqttException
int unsubscribe(java.lang.String assetId, java.lang.String topic) throws EsfMqttException
assetId
- A String specifying the asset ID.topic
- A String object containing the topic.EsfMqttException
void enableConnectionLostTimeout(long timeout)
timeout
- The number of seconds the unit can be disconnected before rebooting.void disableConnectionLostTimeout()
java.lang.String getAssetId() throws EsfMqttException
String
EsfMqttException
Copyright © 2009 Eurotech Inc. All rights reserved.