Package org.openmuc.jeebus.spine.spi
Class Communication
- java.lang.Object
-
- org.openmuc.jeebus.spine.spi.Communication
-
public abstract class Communication extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Communication()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddDevice(java.lang.String communicationAddress)Notifies device listeners of this device and starts the detailed discovery process if enabledabstract voidconnect()Connects to the network, i.e.abstract voiddisconnect()Disconnects from the network, i.e.abstract booleanisConnected()Is the communication layer currently connected to the network?voidonMessageReceived(SpineConnection connection, org.openmuc.jeebus.spine.xsd.v1.DatagramType datagram)abstract SpineConnectionopen(java.lang.String address)voidremoveDevice(java.lang.String address)voidsetDevice(Device device)
-
-
-
Field Detail
-
device
protected Device device
-
-
Method Detail
-
connect
public abstract void connect()
Connects to the network, i.e. makes the communication layer available
-
disconnect
public abstract void disconnect()
Disconnects from the network, i.e. terminates the communication layer
-
isConnected
public abstract boolean isConnected()
Is the communication layer currently connected to the network?
-
open
public abstract SpineConnection open(java.lang.String address)
- Parameters:
address- the address used in the communication protocol, i.e. not the SPINE device address- Returns:
- a connection to the requested device
-
setDevice
public void setDevice(Device device)
-
onMessageReceived
public void onMessageReceived(SpineConnection connection, org.openmuc.jeebus.spine.xsd.v1.DatagramType datagram)
- Parameters:
connection- the connection associated to the received messagedatagram- the received message
-
addDevice
public void addDevice(java.lang.String communicationAddress)
Notifies device listeners of this device and starts the detailed discovery process if enabled- Parameters:
communicationAddress- the address of a newly discovered device
-
removeDevice
public void removeDevice(java.lang.String address)
-
-