Package com.tenio.core.server
Class ServerImpl
java.lang.Object
com.tenio.common.logger.AbstractLogger
com.tenio.common.logger.SystemLogger
com.tenio.core.server.ServerImpl
- All Implemented Interfaces:
Server
@ThreadSafe
public final class ServerImpl
extends com.tenio.common.logger.SystemLogger
implements Server
This class manages the workflow of the current server. The instruction's
orders are important, event subscribes must be set last and all configuration
values should be confirmed.
-
Method Summary
Modifier and TypeMethodDescriptiongetApi()
static Server
Preventing Singleton object instantiation from outside and creates multiple instance if two thread access this method simultaneously.void
shutdown()
Shut down the server and close all services.void
start
(BootstrapHandler bootstrapHandler, String[] params) Start the server base on your own configurations.void
Methods inherited from class com.tenio.common.logger.SystemLogger
debug, trace, trace
Methods inherited from class com.tenio.common.logger.AbstractLogger
buildgen, error, error, info, info, info, info, info, info, info, info
-
Method Details
-
getInstance
Preventing Singleton object instantiation from outside and creates multiple instance if two thread access this method simultaneously.- Returns:
- a new instance
-
start
Description copied from interface:Server
Start the server base on your own configurations. -
shutdown
public void shutdown()Description copied from interface:Server
Shut down the server and close all services. -
getApi
-
getEventManager
- Specified by:
getEventManager
in interfaceServer
-
getPlayerManager
- Specified by:
getPlayerManager
in interfaceServer
-
getRoomManager
- Specified by:
getRoomManager
in interfaceServer
-
write
-