|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eurotech.framework.core.data.transport.mqtt.MqttDataTransport
public class MqttDataTransport
Constructor Summary | |
---|---|
MqttDataTransport()
|
Method Summary | |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext componentContext,
Map<String,Object> properties)
|
void |
connect()
Connects to the remote broker. |
void |
connectionLost(Throwable cause)
|
protected void |
deactivate(org.osgi.service.component.ComponentContext componentContext)
|
void |
deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token)
|
void |
disconnect(long quiesceTimeout)
Disconnects from the broker. |
boolean |
isConnected()
Returns true if the DataTransportService is currently connected to the remote server. |
void |
messageArrived(String topic,
org.eclipse.paho.client.mqttv3.MqttMessage message)
|
DataTransportToken |
publish(String topic,
byte[] payload,
int qos,
boolean retain)
Enqueues a message for publishing with the underlying transport implementation. |
void |
setSystemService(SystemService systemService)
|
void |
subscribe(String topic,
int qos)
Subscribes to a topic on the broker. |
void |
unsetSystemService(SystemService systemService)
|
void |
unsubscribe(String topic)
Unsubscribes to a topic on the broker. |
void |
updated(Map<String,Object> properties)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MqttDataTransport()
Method Detail |
---|
protected void activate(org.osgi.service.component.ComponentContext componentContext, Map<String,Object> properties)
protected void deactivate(org.osgi.service.component.ComponentContext componentContext)
public void updated(Map<String,Object> properties)
public void setSystemService(SystemService systemService)
public void unsetSystemService(SystemService systemService)
public void connect() throws EsfConnectException
DataTransportService
connect
in interface DataTransportService
EsfConnectException
- the caller MAY retry connecting a later time.public boolean isConnected()
DataTransportService
isConnected
in interface DataTransportService
public void disconnect(long quiesceTimeout)
DataTransportService
disconnect
in interface DataTransportService
quiesceTimeout
- - timeout that will be used before forcing a disconnectpublic void subscribe(String topic, int qos) throws EsfTimeoutException, EsfException, EsfNotConnectedException
DataTransportService
subscribe
in interface DataTransportService
EsfTimeoutException
- TODO
EsfException
EsfNotConnectedException
- TODOpublic void unsubscribe(String topic) throws EsfTimeoutException, EsfException, EsfNotConnectedException
DataTransportService
unsubscribe
in interface DataTransportService
EsfTimeoutException
EsfException
EsfNotConnectedException
- TODOpublic DataTransportToken publish(String topic, byte[] payload, int qos, boolean retain) throws EsfTooManyInflightMessagesException, EsfException, EsfNotConnectedException
DataTransportService
publish
in interface DataTransportService
EsfTooManyInflightMessagesException
EsfException
EsfNotConnectedException
- TODOpublic void connectionLost(Throwable cause)
connectionLost
in interface org.eclipse.paho.client.mqttv3.MqttCallback
public void deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken token)
deliveryComplete
in interface org.eclipse.paho.client.mqttv3.MqttCallback
public void messageArrived(String topic, org.eclipse.paho.client.mqttv3.MqttMessage message) throws Exception
messageArrived
in interface org.eclipse.paho.client.mqttv3.MqttCallback
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |