public class NettyUtil
Class NettyUtil. Provides nettyutil functionality for the Hytale server.
java.lang.Object > NettyUtil
Field Summary
oldHandler
final
ChannelHandler
oldHandler
Field oldHandler.
factory
final
ThreadFactory
factory
Field factory.
remoteSocketAddress1
final
SocketAddress
remoteSocketAddress1
Field remoteSocketAddress1.
remoteSocketAddress2
final
SocketAddress
remoteSocketAddress2
Field remoteSocketAddress2.
loggerBackend
final
HytaleLoggerBackend
loggerBackend
Field loggerBackend.
universe
final
Universe
universe
Field universe.
Method Detail
init
static
void
init
()
Method init.
injectLogger
static
void
injectLogger
(@Nonnull final Channel channel)
Method injectLogger.
- Parameters:
@Nonnull final Channelchannel
uninjectLogger
static
void
uninjectLogger
(@Nonnull final Channel channel)
Method uninjectLogger.
- Parameters:
@Nonnull final Channelchannel
setChannelHandler
static
void
setChannelHandler
(@Nonnull final Channel channel, @Nonnull final PacketHandler packetHandler)
Method setChannelHandler.
- Parameters:
@Nonnull final Channelchannel@Nonnull final PacketHandlerpacketHandler
PlayerChannelHandler
public
new
PlayerChannelHandler
(packetHandler)
Method PlayerChannelHandler.
- Parameters:
packetHandlerpacketHandler
getEventLoopGroup
static
EventLoopGroup
getEventLoopGroup
(final String name)
Method getEventLoopGroup.
- Parameters:
final Stringname
getServerChannel
public
ServerChannel>
getServerChannel
()
Method getServerChannel.
getDatagramChannelFactory
public
DatagramChannel>
getDatagramChannelFactory
(final SocketProtocolFamily family)
Method getDatagramChannelFactory.
- Parameters:
final SocketProtocolFamilyfamily
formatRemoteAddress
static
String
formatRemoteAddress
(final Channel channel)
Method formatRemoteAddress.
- Parameters:
final Channelchannel
formatLocalAddress
static
String
formatLocalAddress
(final Channel channel)
Method formatLocalAddress.
- Parameters:
final Channelchannel
getRemoteSocketAddress
static
SocketAddress
getRemoteSocketAddress
(final Channel channel)
Method getRemoteSocketAddress.
- Parameters:
final Channelchannel
isFromSameOrigin
static
boolean
isFromSameOrigin
(final Channel channel1, final Channel channel2)
Method isFromSameOrigin.
- Parameters:
final Channelchannel1final Channelchannel2
ReflectiveChannelFactory
public
public
ReflectiveChannelFactory
(@Nonnull final Class extends T> clazz, final SocketProtocolFamily family)
Method ReflectiveChannelFactory.
- Parameters:
@Nonnull final Class extends T>clazzfinal SocketProtocolFamilyfamily
IllegalArgumentException
public
new
IllegalArgumentException
("Class " + StringUtil.simpleClassName(clazz)
Method IllegalArgumentException.
- Parameters:
"Class " +StringUtil.simpleClassName(clazz
newChannel
public
T
newChannel
()
Method newChannel.
ChannelException
public
new
ChannelException
("Unable to create Channel from class " + String.valueOf(this.constructor.getDeclaringClass()
Method ChannelException.
- Parameters:
"Unable to create Channel from class " +String.valueOf(this.constructor.getDeclaringClass(
getSimpleName
public
String
getSimpleName
()
Method getSimpleName.
toString
public
String
toString
()
Method toString.