Class UDPStringServer
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<String>
org.openremote.agent.protocol.udp.UDPStringServer
- All Implemented Interfaces:
IOServer<String,io.netty.channel.socket.DatagramChannel, InetSocketAddress>
This is an
AbstractUDPServer implementation that handles String messages.
Uses DelimiterBasedFrameDecoder and StringDecoder.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openremote.agent.protocol.io.IOServer
IOServer.IoServerMessageConsumer<T,U, V> -
Field Summary
FieldsFields inherited from class org.openremote.agent.protocol.udp.AbstractUDPServer
lastMessageSender, localAddressFields inherited from class org.openremote.agent.protocol.io.AbstractNettyIOServer
allChannels, bootstrap, channel, channelFuture, clientConnectionStatusConsumers, clientLimit, connectionStatus, connectionStatusConsumers, executorService, INITIAL_RECONNECT_DELAY_MILLIS, LOG, MAX_RECONNECT_DELAY_MILLIS, messageConsumers, RECONNECT_BACKOFF_MULTIPLIER, reconnectDelayMilliseconds, reconnectTask, workerGroup -
Constructor Summary
ConstructorsConstructorDescriptionUDPStringServer(InetSocketAddress localAddress, String delimiter, int maxFrameLength, boolean stripDelimiter) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDecoders(io.netty.channel.socket.DatagramChannel channel) protected voidaddEncoders(io.netty.channel.socket.DatagramChannel channel) Methods inherited from class org.openremote.agent.protocol.udp.AbstractUDPServer
addEncoder, createAndConfigureBootstrap, getClientDescriptor, getSocketAddressString, handleMessageReceived, initChannel, sendMessage, sendMessage, sendMessageMethods inherited from class org.openremote.agent.protocol.io.AbstractNettyIOServer
addConnectionStatusConsumer, addConnectionStatusConsumer, addDecoder, addMessageConsumer, disconnectClient, getConnectionStatus, getConnectionStatus, initClientChannel, onClientConnected, onClientDisconnected, onConnectionStatusChanged, onDecodeException, onEncodeException, onMessageReceived, removeAllConnectionStatusConsumers, removeAllMessageConsumers, removeConnectionStatusConsumer, removeConnectionStatusConsumer, removeMessageConsumer, scheduleReconnect, sendClientConnectionStatus, start, stop
-
Field Details
-
delimiter
-
maxFrameLength
protected int maxFrameLength -
stripDelimiter
protected boolean stripDelimiter
-
-
Constructor Details
-
UDPStringServer
public UDPStringServer(InetSocketAddress localAddress, String delimiter, int maxFrameLength, boolean stripDelimiter)
-
-
Method Details
-
addDecoders
protected void addDecoders(io.netty.channel.socket.DatagramChannel channel) - Specified by:
addDecodersin classAbstractNettyIOServer<String,io.netty.channel.socket.DatagramChannel, io.netty.bootstrap.Bootstrap, InetSocketAddress>
-
addEncoders
protected void addEncoders(io.netty.channel.socket.DatagramChannel channel) - Specified by:
addEncodersin classAbstractNettyIOServer<String,io.netty.channel.socket.DatagramChannel, io.netty.bootstrap.Bootstrap, InetSocketAddress>
-