Class CommonDataHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.geysermc.floodgate.core.addon.data.CommonDataHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public abstract class CommonDataHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final PacketBlockerprotected final FloodgateConfigprotected io.netty.channel.ChannelHandlerContextprotected final FloodgateHandshakeHandlerprotected Objectprotected final io.netty.util.AttributeKey<String> -
Constructor Summary
ConstructorsConstructorDescriptionCommonDataHandler(FloodgateHandshakeHandler handshakeHandler, FloodgateConfig config, io.netty.util.AttributeKey<String> kickMessageAttribute, PacketBlocker blocker) -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object packet) protected abstract booleanchannelRead(Object packet) protected voiddisablePacketQueue(boolean removeSelf) voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) protected final Stringprotected voidvoidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx) protected voidprotected abstract ObjectsetHostname(Object handshakePacket, String hostname) protected final voidsetKickMessage(String message) protected abstract voidsetNewIp(io.netty.channel.Channel channel, InetSocketAddress newIp) protected booleanshouldCallFireRead(Object queuedPacket) protected booleanMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerRemoved
-
Field Details
-
handshakeHandler
-
config
-
kickMessageAttribute
-
blocker
-
packetQueue
-
handshakePacket
-
ctx
protected io.netty.channel.ChannelHandlerContext ctx
-
-
Constructor Details
-
CommonDataHandler
public CommonDataHandler(FloodgateHandshakeHandler handshakeHandler, FloodgateConfig config, io.netty.util.AttributeKey<String> kickMessageAttribute, PacketBlocker blocker)
-
-
Method Details
-
setNewIp
-
setHostname
-
channelRead
- Throws:
Exception
-
shouldRemoveHandler
-
shouldCallFireRead
-
handle
-
disablePacketQueue
protected void disablePacketQueue(boolean removeSelf) -
removeSelf
protected void removeSelf() -
setKickMessage
-
getKickMessage
-
handlerAdded
- Specified by:
handlerAddedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerAddedin classio.netty.channel.ChannelHandlerAdapter- Throws:
Exception
-
channelRead
- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.ChannelInboundHandlerAdapter
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception - Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-