Class SingleItemToSingleRequestProtocol
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
org.apache.plc4x.java.base.protocol.SingleItemToSingleRequestProtocol
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
public class SingleItemToSingleRequestProtocol
extends io.netty.channel.ChannelDuplexHandler
This layer can be used to split a
PlcRequest which addresses multiple PlcFields into multiple subsequent PlcRequests.-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classSingleItemToSingleRequestProtocol.CorrelatedPlcReadRequestprotected static interfaceSingleItemToSingleRequestProtocol.CorrelatedPlcRequestprotected static classSingleItemToSingleRequestProtocol.CorrelatedPlcSubscriptionRequestprotected static classSingleItemToSingleRequestProtocol.CorrelatedPlcUnsubscriptionRequestprotected static classSingleItemToSingleRequestProtocol.CorrelatedPlcWriteRequeststatic classSingleItemToSingleRequestProtocol.SplitConfig -
Field Summary
Fields Modifier and Type Field Description static org.slf4j.LoggerLOGGER -
Constructor Summary
Constructors Constructor Description SingleItemToSingleRequestProtocol(PlcReader reader, PlcWriter writer, PlcSubscriber subscriber, io.netty.util.Timer timer)SingleItemToSingleRequestProtocol(PlcReader reader, PlcWriter writer, PlcSubscriber subscriber, io.netty.util.Timer timer, long defaultReceiveTimeout, SingleItemToSingleRequestProtocol.SplitConfig splitConfig, boolean betterImplementationPossible)SingleItemToSingleRequestProtocol(PlcReader reader, PlcWriter writer, PlcSubscriber subscriber, io.netty.util.Timer timer, SingleItemToSingleRequestProtocol.SplitConfig splitConfig)SingleItemToSingleRequestProtocol(PlcReader reader, PlcWriter writer, PlcSubscriber subscriber, io.netty.util.Timer timer, SingleItemToSingleRequestProtocol.SplitConfig splitConfig, boolean betterImplementationPossible) -
Method Summary
Modifier and Type Method Description voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx)voidchannelRegistered(io.netty.channel.ChannelHandlerContext ctx)voidchannelUnregistered(io.netty.channel.ChannelHandlerContext ctx)protected voiderrored(Integer currentTdpu, Throwable throwable, CompletableFuture<InternalPlcResponse> originalResponseFuture)Map<String,Number>getStatistics()protected voidtryFinish(Integer currentTdpu, InternalPlcResponse msg, CompletableFuture<InternalPlcResponse> originalResponseFuture)protected voidtrySendingMessages(io.netty.channel.ChannelHandlerContext ctx)voidwrite(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise)Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, readMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRead, channelReadComplete, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
Field Details
-
LOGGER
public static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
SingleItemToSingleRequestProtocol
public SingleItemToSingleRequestProtocol(PlcReader reader, PlcWriter writer, PlcSubscriber subscriber, io.netty.util.Timer timer) -
SingleItemToSingleRequestProtocol
public SingleItemToSingleRequestProtocol(PlcReader reader, PlcWriter writer, PlcSubscriber subscriber, io.netty.util.Timer timer, SingleItemToSingleRequestProtocol.SplitConfig splitConfig) -
SingleItemToSingleRequestProtocol
public SingleItemToSingleRequestProtocol(PlcReader reader, PlcWriter writer, PlcSubscriber subscriber, io.netty.util.Timer timer, SingleItemToSingleRequestProtocol.SplitConfig splitConfig, boolean betterImplementationPossible) -
SingleItemToSingleRequestProtocol
public SingleItemToSingleRequestProtocol(PlcReader reader, PlcWriter writer, PlcSubscriber subscriber, io.netty.util.Timer timer, long defaultReceiveTimeout, SingleItemToSingleRequestProtocol.SplitConfig splitConfig, boolean betterImplementationPossible)
-
-
Method Details
-
channelRegistered
- Specified by:
channelRegisteredin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelRegisteredin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
channelUnregistered
- Specified by:
channelUnregisteredin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelUnregisteredin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
channelInactive
- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
tryFinish
protected void tryFinish(Integer currentTdpu, InternalPlcResponse msg, CompletableFuture<InternalPlcResponse> originalResponseFuture) -
errored
protected void errored(Integer currentTdpu, Throwable throwable, CompletableFuture<InternalPlcResponse> originalResponseFuture) -
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception- Specified by:
writein interfaceio.netty.channel.ChannelOutboundHandler- Overrides:
writein classio.netty.channel.ChannelDuplexHandler- Throws:
Exception
-
trySendingMessages
protected void trySendingMessages(io.netty.channel.ChannelHandlerContext ctx) -
getStatistics
-