Search in sources :

Example 41 with EzySimpleServerContext

use of com.tvd12.ezyfoxserver.context.EzySimpleServerContext in project ezyfox-server by youngmonkeys.

the class EzyUdpServerBootstrapTest method test.

@Test
public void test() throws Exception {
    EzySimpleServerContext context = new EzySimpleServerContext();
    EzySimpleServer server = new EzySimpleServer();
    EzySimpleSettings settings = new EzySimpleSettings();
    server.setSettings(settings);
    context.setServer(server);
    EzyHandlerGroupManager handlerGroupManager = mock(EzyHandlerGroupManager.class);
    EzyUdpServerBootstrap bootstrap = EzyUdpServerBootstrap.builder().serverContext(context).handlerGroupManager(handlerGroupManager).build();
    bootstrap.start();
    Thread.sleep(250);
    bootstrap.destroy();
}
Also used : EzySimpleServer(com.tvd12.ezyfoxserver.EzySimpleServer) EzySimpleServerContext(com.tvd12.ezyfoxserver.context.EzySimpleServerContext) EzyHandlerGroupManager(com.tvd12.ezyfoxserver.nio.wrapper.EzyHandlerGroupManager) EzyUdpServerBootstrap(com.tvd12.ezyfoxserver.nio.EzyUdpServerBootstrap) EzySimpleSettings(com.tvd12.ezyfoxserver.setting.EzySimpleSettings) Test(org.testng.annotations.Test)

Aggregations

EzySimpleServerContext (com.tvd12.ezyfoxserver.context.EzySimpleServerContext)41 EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)39 Test (org.testng.annotations.Test)34 EzySimpleSettings (com.tvd12.ezyfoxserver.setting.EzySimpleSettings)16 EzyResponseApi (com.tvd12.ezyfoxserver.api.EzyResponseApi)15 EzySession (com.tvd12.ezyfoxserver.entity.EzySession)14 EzySimpleStreamingSetting (com.tvd12.ezyfoxserver.setting.EzySimpleStreamingSetting)14 EzySimpleSessionTokenGenerator (com.tvd12.ezyfoxserver.service.impl.EzySimpleSessionTokenGenerator)13 EzySimpleStatistics (com.tvd12.ezyfoxserver.statistics.EzySimpleStatistics)13 EzyStatistics (com.tvd12.ezyfoxserver.statistics.EzyStatistics)13 ExecutorService (java.util.concurrent.ExecutorService)13 EzyArray (com.tvd12.ezyfox.entity.EzyArray)11 EzyZoneContext (com.tvd12.ezyfoxserver.context.EzyZoneContext)11 EzyHandlerGroupBuilderFactory (com.tvd12.ezyfoxserver.nio.factory.EzyHandlerGroupBuilderFactory)11 EzyEventControllers (com.tvd12.ezyfoxserver.wrapper.EzyEventControllers)11 BaseTest (com.tvd12.test.base.BaseTest)11 EzyErrorScheduledExecutorService (com.tvd12.ezyfox.concurrent.EzyErrorScheduledExecutorService)10 EzySimpleZone (com.tvd12.ezyfoxserver.EzySimpleZone)10 EzySimpleZoneContext (com.tvd12.ezyfoxserver.context.EzySimpleZoneContext)10 EzyLoginController (com.tvd12.ezyfoxserver.controller.EzyLoginController)10