NettyUtil

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 Channel channel

uninjectLogger

static void uninjectLogger (@Nonnull final Channel channel)

Method uninjectLogger.

Parameters:
@Nonnull final Channel channel

setChannelHandler

static void setChannelHandler (@Nonnull final Channel channel, @Nonnull final PacketHandler packetHandler)

Method setChannelHandler.

Parameters:
@Nonnull final Channel channel
@Nonnull final PacketHandler packetHandler

PlayerChannelHandler

public new PlayerChannelHandler (packetHandler)

Method PlayerChannelHandler.

Parameters:
packetHandler packetHandler

getEventLoopGroup

static EventLoopGroup getEventLoopGroup (final String name)

Method getEventLoopGroup.

Parameters:
final String name

getServerChannel

public ServerChannel> getServerChannel ()

Method getServerChannel.

getDatagramChannelFactory

public DatagramChannel> getDatagramChannelFactory (final SocketProtocolFamily family)

Method getDatagramChannelFactory.

Parameters:
final SocketProtocolFamily family

formatRemoteAddress

static String formatRemoteAddress (final Channel channel)

Method formatRemoteAddress.

Parameters:
final Channel channel

formatLocalAddress

static String formatLocalAddress (final Channel channel)

Method formatLocalAddress.

Parameters:
final Channel channel

getRemoteSocketAddress

static SocketAddress getRemoteSocketAddress (final Channel channel)

Method getRemoteSocketAddress.

Parameters:
final Channel channel

isFromSameOrigin

static boolean isFromSameOrigin (final Channel channel1, final Channel channel2)

Method isFromSameOrigin.

Parameters:
final Channel channel1
final Channel channel2

ReflectiveChannelFactory

public public ReflectiveChannelFactory (@Nonnull final Class clazz, final SocketProtocolFamily family)

Method ReflectiveChannelFactory.

Parameters:
@Nonnull final Class clazz
final SocketProtocolFamily family

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.