Class MQTT
- java.lang.Object
-
- io.patriot_framework.generator.network.MQTT
-
- All Implemented Interfaces:
NetworkAdapter
public class MQTT extends Object implements NetworkAdapter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataWrapper
getDataWrapper()
Returns DataWrapper that is used by Devicevoid
send(List<Data> data)
Sends data which are wrapped by DataWrappers, there fore in String format.void
setDataWrapper(DataWrapper dataWrapper)
Sets DataWrapper for Device, which allows to transform generated data and important information about its origin to common data structures e.g.
-
-
-
Constructor Detail
-
MQTT
public MQTT(String serverURI)
-
-
Method Detail
-
send
public void send(List<Data> data)
Description copied from interface:NetworkAdapter
Sends data which are wrapped by DataWrappers, there fore in String format.- Specified by:
send
in interfaceNetworkAdapter
- Parameters:
data
- data to be send
-
setDataWrapper
public void setDataWrapper(DataWrapper dataWrapper)
Description copied from interface:NetworkAdapter
Sets DataWrapper for Device, which allows to transform generated data and important information about its origin to common data structures e.g. JSON, XML, for better manipulation.- Specified by:
setDataWrapper
in interfaceNetworkAdapter
- Parameters:
dataWrapper
- instance of DataWrapper
-
getDataWrapper
public DataWrapper getDataWrapper()
Description copied from interface:NetworkAdapter
Returns DataWrapper that is used by Device- Specified by:
getDataWrapper
in interfaceNetworkAdapter
- Returns:
- instance of DataWrapper
-
-