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, setPropertyStorage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
resendAllProperties, sendAggregate, sendEmptyCache, sendIndividualValue, sendIntrospection
protected 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 AstarteTransport
AstarteTransportException
AstarteCryptoException
public void disconnect() throws AstarteTransportException
disconnect
in class AstarteTransport
AstarteTransportException
public boolean isConnected()
isConnected
in class AstarteTransport
public void onFailure(org.eclipse.paho.client.mqttv3.IMqttToken asyncActionToken, java.lang.Throwable exception)
onFailure
in interface org.eclipse.paho.client.mqttv3.IMqttActionListener
protected abstract void onConnected(org.eclipse.paho.client.mqttv3.IMqttToken asyncActionToken) throws AstarteTransportException
AstarteTransportException