public interface IEsfMqttMasterClient
Modifier and Type | Method and Description |
---|---|
int |
controlSubscribe(java.lang.String topic,
int qos)
Subscribes to a topic with the MQtt broker.
|
boolean |
isConnected()
Returns an indication of whether the MQtt connection to the broker is
established.
|
int |
publish(java.lang.String topic,
byte[] payload,
int qos,
boolean retain)
Publishes a message to the MQtt broker.
|
int |
publish(java.lang.String assetId,
java.lang.String topic,
byte[] payload,
int qos,
boolean retain)
Publishes a message to the MQtt broker.
|
void |
registerCallback(IEsfMqttCallbackHandler esfMqttCallbackHandler)
Register an IEsfMqttCallback with the IEsfMqttClient.
|
void |
release()
Releases this handle to the master client.
|
int |
subscribe(com.eurotech.cloud.message.EdcSubscription subscription)
Subscribes to a topic with the MQtt broker.
|
int |
subscribe(com.eurotech.cloud.message.EdcSubscription[] subscriptions)
Subscribes to one or more topics with 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 topic,
int qos)
Subscribes to a topic 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(com.eurotech.cloud.message.EdcSubscription subscription)
Unsubscribes from a topic with the MQtt broker.
|
int |
unsubscribe(java.lang.String topic)
Unsubscribes from 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.
|
int publish(java.lang.String topic, byte[] payload, int qos, boolean retain) throws EsfMqttException
topic
- A String specifying the 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 publish(java.lang.String assetId, java.lang.String topic, byte[] payload, int qos, boolean retain) throws EsfMqttException
assetId
- A String specifying the asset ID.topic
- A String specifying the 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 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
int unsubscribe(com.eurotech.cloud.message.EdcSubscription subscription) throws EsfMqttException
subscription
- A EdcSubscription object containing the topic.EsfMqttException
int unsubscribe(java.lang.String topic) throws EsfMqttException
topic
- A String object containing the topic.EsfMqttException
int subscribe(com.eurotech.cloud.message.EdcSubscription[] subscriptions) throws EsfMqttException
subscriptions
- An array of EdcSubscription objects.EsfMqttException
int subscribe(com.eurotech.cloud.message.EdcSubscription subscription) throws EsfMqttException
subscription
- An EdcSubscription object.EsfMqttException
int subscribe(java.lang.String topic, int qos) throws EsfMqttException
topic
- A String object containing the topic.qos
- An int containing the Quality of Service.EsfMqttException
int controlSubscribe(java.lang.String topic, int qos) throws EsfMqttException
topic
- A String object containing the topic.qos
- An int containing the Quality of Service.EsfMqttException
boolean isConnected()
void registerCallback(IEsfMqttCallbackHandler esfMqttCallbackHandler)
esfMqttCallbackHandler
- An implementation of the IEsfMqttCallbackHandler interface.void release()
Copyright © 2009 Eurotech Inc. All rights reserved.