Class Rest
- java.lang.Object
-
- io.patriot_framework.generator.network.Rest
-
- All Implemented Interfaces:
NetworkAdapter
public class Rest extends Object implements NetworkAdapter
-
-
Constructor Summary
Constructors Constructor Description Rest(String endpoint, DataWrapper dataWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataWrapper
getDataWrapper()
Returns DataWrapper that is used by DeviceString
getEndpoint()
void
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.void
setEndpoint(String endpoint)
-
-
-
Constructor Detail
-
Rest
public Rest(String endpoint, DataWrapper dataWrapper)
-
-
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
-
getEndpoint
public String getEndpoint()
-
setEndpoint
public void setEndpoint(String endpoint)
-
-