T
- TODO: configure LWTpublic abstract class AbstractMaestroPeer<T extends MaestroNote> extends Object implements org.eclipse.paho.client.mqttv3.MqttCallbackExtended
Modifier and Type | Field and Description |
---|---|
protected String |
clientName |
Modifier | Constructor and Description |
---|---|
protected |
AbstractMaestroPeer(org.eclipse.paho.client.mqttv3.MqttClient inboundEndPoint,
String clientName,
MaestroNoteDeserializer<? extends T> deserializer) |
|
AbstractMaestroPeer(String url,
String clientName,
MaestroNoteDeserializer<? extends T> deserializer) |
Modifier and Type | Method and Description |
---|---|
void |
connect() |
void |
connectComplete(boolean reconnect,
String serverUri) |
void |
connectionLost(Throwable throwable) |
void |
deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken iMqttDeliveryToken) |
void |
disconnect() |
String |
getClientName() |
String |
getId() |
boolean |
isConnected() |
abstract boolean |
isRunning() |
void |
messageArrived(String s,
org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage) |
protected abstract void |
noteArrived(T note)
The entry point for handling Maestro messages
|
void |
reconnect(String[] topics) |
void |
setClientName(String clientName) |
void |
subscribe(String[] topics) |
void |
subscribe(String topic,
int qos) |
protected String clientName
public AbstractMaestroPeer(String url, String clientName, MaestroNoteDeserializer<? extends T> deserializer) throws MaestroConnectionException
MaestroConnectionException
protected AbstractMaestroPeer(org.eclipse.paho.client.mqttv3.MqttClient inboundEndPoint, String clientName, MaestroNoteDeserializer<? extends T> deserializer) throws MaestroConnectionException
MaestroConnectionException
public String getClientName()
public void setClientName(String clientName)
public String getId()
public void connectionLost(Throwable throwable)
connectionLost
in interface org.eclipse.paho.client.mqttv3.MqttCallback
public boolean isConnected()
public void deliveryComplete(org.eclipse.paho.client.mqttv3.IMqttDeliveryToken iMqttDeliveryToken)
deliveryComplete
in interface org.eclipse.paho.client.mqttv3.MqttCallback
public void connect() throws MaestroConnectionException
MaestroConnectionException
public void reconnect(String[] topics)
public void disconnect() throws MaestroConnectionException
MaestroConnectionException
public void subscribe(String topic, int qos)
public void subscribe(String[] topics) throws MaestroConnectionException
MaestroConnectionException
public void messageArrived(String s, org.eclipse.paho.client.mqttv3.MqttMessage mqttMessage)
messageArrived
in interface org.eclipse.paho.client.mqttv3.MqttCallback
public void connectComplete(boolean reconnect, String serverUri)
connectComplete
in interface org.eclipse.paho.client.mqttv3.MqttCallbackExtended
protected abstract void noteArrived(T note) throws MaestroConnectionException
note
- the note that arrivedMaestroConnectionException
- for Maestro related errorspublic abstract boolean isRunning()
This documentation was released into the public domain.