public abstract class AstarteMqttTransport extends AstarteTransport implements org.eclipse.paho.client.mqttv3.IMqttActionListener
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.paho.client.mqttv3.MqttAsyncClient |
m_client |
m_astarteTransportEventListener, m_failedMessageStorage, m_introspectionSent, m_messageListener, m_propertyStorage| Modifier | Constructor and Description |
|---|---|
protected |
AstarteMqttTransport(AstarteProtocolType type,
MqttConnectionInfo connectionInfo) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect() |
void |
disconnect() |
MqttConnectionInfo |
getConnectionInfo() |
boolean |
isConnected() |
protected abstract void |
onConnected(org.eclipse.paho.client.mqttv3.IMqttToken asyncActionToken) |
void |
onFailure(org.eclipse.paho.client.mqttv3.IMqttToken asyncActionToken,
java.lang.Throwable exception) |
protected void |
setCallback(org.eclipse.paho.client.mqttv3.MqttCallback callback) |
getAstarteProtocolType, getAstarteTransportEventListener, getDevice, getFailedMessageStorage, getMessageListener, getPropertyStorage, removePropertyFromStorage, savePropertyToStorage, sendAggregate, sendIndividualValue, setAstarteTransportEventListener, setDevice, setFailedMessageStorage, setMessageListener, setPropertyStorageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresendAllProperties, sendAggregate, sendEmptyCache, sendIndividualValue, sendIntrospectionprotected AstarteMqttTransport(AstarteProtocolType type, MqttConnectionInfo connectionInfo)
protected void setCallback(org.eclipse.paho.client.mqttv3.MqttCallback callback)
public MqttConnectionInfo getConnectionInfo()
public void connect()
throws AstarteTransportException,
AstarteCryptoException
connect in class AstarteTransportAstarteTransportExceptionAstarteCryptoExceptionpublic void disconnect()
throws AstarteTransportException
disconnect in class AstarteTransportAstarteTransportExceptionpublic boolean isConnected()
isConnected in class AstarteTransportpublic void onFailure(org.eclipse.paho.client.mqttv3.IMqttToken asyncActionToken,
java.lang.Throwable exception)
onFailure in interface org.eclipse.paho.client.mqttv3.IMqttActionListenerprotected abstract void onConnected(org.eclipse.paho.client.mqttv3.IMqttToken asyncActionToken)
throws AstarteTransportException
AstarteTransportException