public class SourceRconPacketAssembler extends MessageInboundDecoder
SourceRconPacket split-packet back into a single SourceRconPacket instance.
Note
When terminator packets are enabled, we expect to receive two terminator packets with request id of -1 and with terminator byte of 0 then 1. This implementation expects only to receive a SINGLE terminator packet, because there are cases when an unauthenticated request is sent, then the server will only send a single terminator packet (with terminator value of 0) instead of two.
SourceRconOptions.USE_TERMINATOR_PACKET| Constructor and Description |
|---|
SourceRconPacketAssembler() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acceptMessage(AbstractRequest request,
Object msg)
acceptMessage.
|
void |
channelActive(@NotNull io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(@NotNull io.netty.channel.ChannelHandlerContext ctx) |
void |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
protected Object |
decodeMessage(io.netty.channel.ChannelHandlerContext ctx,
AbstractRequest request,
Object msg)
decodeMessage.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
afterDecode, beforeDecode, isSuppressLog, readMessage, setSuppressLogchannelRead, debug, debug, debug, debug, error, error, handlerAdded, handlerRemoved, info, isDebugEnabled, log, log, printField, trace, warnprotected boolean acceptMessage(AbstractRequest request, Object msg)
acceptMessage.
acceptMessage in class MessageInboundDecoderrequest - a AbstractRequest objectmsg - a Object objectprotected Object decodeMessage(io.netty.channel.ChannelHandlerContext ctx, AbstractRequest request, Object msg)
decodeMessage.
decodeMessage in class MessageInboundDecoderctx - a ChannelHandlerContext objectrequest - a AbstractRequest objectmsg - a Object objectObject objectpublic void channelActive(@NotNull
@NotNull io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelInactive(@NotNull
@NotNull io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelReadComplete in interface io.netty.channel.ChannelInboundHandlerchannelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt)
throws Exception
userEventTriggered in interface io.netty.channel.ChannelInboundHandleruserEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
throws Exception
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterExceptionCopyright © 2016–2024. All rights reserved.