Class AbstractUDPServer<T>

java.lang.Object
org.openremote.agent.protocol.io.AbstractNettyIOServer<T,io.netty.channel.socket.DatagramChannel,io.netty.bootstrap.Bootstrap,InetSocketAddress>
org.openremote.agent.protocol.udp.AbstractUDPServer<T>
All Implemented Interfaces:
IOServer<T,io.netty.channel.socket.DatagramChannel,InetSocketAddress>
Direct Known Subclasses:
UDPStringServer

public abstract class AbstractUDPServer<T> extends AbstractNettyIOServer<T,io.netty.channel.socket.DatagramChannel,io.netty.bootstrap.Bootstrap,InetSocketAddress>
UDP in Netty is crap; everything goes through the single server channel as it is connectionless but there is no way of tracking packet origin across decoders. From reading each channel is single threaded so making an assumption that we can store packet origin for processing in AbstractNettyIOServer.onMessageReceived(T, U, W). For outbound messages we wrap each decoder in a DatagramPacketEncoder which unfortunately only supports MessageToMessageEncoders.