public abstract class AbstractNettyServer extends Object implements NettyServer
Server.TRANSMISSION_PROTOCOL, Server.TransmissionProtocol| Modifier and Type | Field and Description |
|---|---|
static io.netty.channel.group.ChannelGroup |
ALL_CHANNELS |
protected io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> |
channelInitializer |
protected GameAdminService |
gameAdminService |
private static org.slf4j.Logger |
LOG |
protected NettyConfig |
nettyConfig |
| Constructor and Description |
|---|
AbstractNettyServer(NettyConfig nettyConfig,
io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> channelInitializer) |
| Modifier and Type | Method and Description |
|---|---|
protected io.netty.channel.EventLoopGroup |
getBossGroup() |
io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> |
getChannelInitializer()
createServerBootstrap will create a pipeline factory and save it as a
class variable.
|
GameAdminService |
getGameAdminService() |
NettyConfig |
getNettyConfig()
Get the netty configuration associated with this server.
|
InetSocketAddress |
getSocketAddress() |
protected io.netty.channel.EventLoopGroup |
getWorkerGroup() |
void |
setGameAdminService(GameAdminService gameAdminService) |
void |
startServer(InetSocketAddress socketAddress) |
void |
startServer(int port) |
void |
stopServer() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetChannelInitializergetTransmissionProtocol, startServerprivate static final org.slf4j.Logger LOG
public static final io.netty.channel.group.ChannelGroup ALL_CHANNELS
protected GameAdminService gameAdminService
protected final NettyConfig nettyConfig
protected io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> channelInitializer
public AbstractNettyServer(NettyConfig nettyConfig, io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> channelInitializer)
public void startServer(int port)
throws Exception
startServer in interface ServerExceptionpublic void startServer(InetSocketAddress socketAddress) throws Exception
startServer in interface ServerExceptionpublic void stopServer()
throws Exception
stopServer in interface ServerExceptionpublic io.netty.channel.ChannelInitializer<? extends io.netty.channel.Channel> getChannelInitializer()
NettyServergetChannelInitializer in interface NettyServerpublic NettyConfig getNettyConfig()
NettyServergetNettyConfig in interface NettyServerprotected io.netty.channel.EventLoopGroup getBossGroup()
protected io.netty.channel.EventLoopGroup getWorkerGroup()
public GameAdminService getGameAdminService()
public void setGameAdminService(GameAdminService gameAdminService)
public InetSocketAddress getSocketAddress()
getSocketAddress in interface ServerCopyright © 2013. All Rights Reserved.