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, setSuppressLog
channelRead, debug, debug, debug, debug, error, error, handlerAdded, handlerRemoved, info, isDebugEnabled, log, log, printField, trace, warn
protected boolean acceptMessage(AbstractRequest request, Object msg)
acceptMessage.
acceptMessage
in class MessageInboundDecoder
request
- a AbstractRequest
objectmsg
- a Object
objectprotected Object decodeMessage(io.netty.channel.ChannelHandlerContext ctx, AbstractRequest request, Object msg)
decodeMessage.
decodeMessage
in class MessageInboundDecoder
ctx
- 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.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelInactive(@NotNull @NotNull io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelReadComplete
in interface io.netty.channel.ChannelInboundHandler
channelReadComplete
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
userEventTriggered
in interface io.netty.channel.ChannelInboundHandler
userEventTriggered
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
Copyright © 2016–2024. All rights reserved.