Class TCPStringServer
java.lang.Object
org.openremote.agent.protocol.io.AbstractNettyIOServer<T,io.netty.channel.socket.SocketChannel,io.netty.bootstrap.ServerBootstrap,InetSocketAddress>
org.openremote.agent.protocol.tcp.AbstractTCPServer<String>
org.openremote.agent.protocol.tcp.TCPStringServer
- All Implemented Interfaces:
IOServer<String,io.netty.channel.socket.SocketChannel, InetSocketAddress>
This is an
AbstractTCPServer 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.tcp.AbstractTCPServer
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
ConstructorsConstructorDescriptionTCPStringServer(InetSocketAddress localAddress, String delimiter, int maxFrameLength, boolean stripDelimiter) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddDecoders(io.netty.channel.socket.SocketChannel channel) protected voidaddEncoders(io.netty.channel.socket.SocketChannel channel) Methods inherited from class org.openremote.agent.protocol.tcp.AbstractTCPServer
createAndConfigureBootstrap, getClientDescriptor, getSocketAddressStringMethods inherited from class org.openremote.agent.protocol.io.AbstractNettyIOServer
addConnectionStatusConsumer, addConnectionStatusConsumer, addDecoder, addEncoder, addMessageConsumer, disconnectClient, getConnectionStatus, getConnectionStatus, handleMessageReceived, initChannel, initClientChannel, onClientConnected, onClientDisconnected, onConnectionStatusChanged, onDecodeException, onEncodeException, onMessageReceived, removeAllConnectionStatusConsumers, removeAllMessageConsumers, removeConnectionStatusConsumer, removeConnectionStatusConsumer, removeMessageConsumer, scheduleReconnect, sendClientConnectionStatus, sendMessage, sendMessage, sendMessage, start, stop
-
Field Details
-
delimiter
-
maxFrameLength
protected int maxFrameLength -
stripDelimiter
protected boolean stripDelimiter
-
-
Constructor Details
-
TCPStringServer
public TCPStringServer(InetSocketAddress localAddress, String delimiter, int maxFrameLength, boolean stripDelimiter)
-
-
Method Details
-
addDecoders
protected void addDecoders(io.netty.channel.socket.SocketChannel channel) - Specified by:
addDecodersin classAbstractNettyIOServer<String,io.netty.channel.socket.SocketChannel, io.netty.bootstrap.ServerBootstrap, InetSocketAddress>
-
addEncoders
protected void addEncoders(io.netty.channel.socket.SocketChannel channel) - Specified by:
addEncodersin classAbstractNettyIOServer<String,io.netty.channel.socket.SocketChannel, io.netty.bootstrap.ServerBootstrap, InetSocketAddress>
-