Search in sources :

Example 6 with EzyStreamingApi

use of com.tvd12.ezyfoxserver.api.EzyStreamingApi in project ezyfox-server by youngmonkeys.

the class EzyNioServerBootstrapBuilderImpl method newServerBootstrap.

@Override
protected EzyServerBootstrap newServerBootstrap() {
    ExecutorService statsThreadPool = newStatsThreadPool();
    EzyCodecFactory codecFactory = newCodecFactory();
    EzyStreamingApi streamingApi = newStreamingApi();
    EzyResponseApi responseApi = newResponseApi(codecFactory);
    EzySocketStreamQueue streamQueue = newStreamQueue();
    EzySessionTicketsQueue socketSessionTicketsQueue = newSocketSessionTicketsQueue();
    EzySessionTicketsQueue websocketSessionTicketsQueue = newWebSocketSessionTicketsQueue();
    EzySocketDisconnectionQueue socketDisconnectionQueue = newSocketDisconnectionQueue();
    EzySessionTicketsRequestQueues sessionTicketsRequestQueues = newSessionTicketsRequestQueues();
    EzyHandlerGroupBuilderFactory handlerGroupBuilderFactory = newHandlerGroupBuilderFactory(statsThreadPool, codecFactory, streamQueue, socketDisconnectionQueue, socketSessionTicketsQueue, websocketSessionTicketsQueue, sessionTicketsRequestQueues);
    EzyHandlerGroupManager handlerGroupManager = newHandlerGroupManager(handlerGroupBuilderFactory);
    EzySocketDataReceiver socketDataReceiver = newSocketDataReceiver(handlerGroupManager);
    EzyNioServerBootstrap bootstrap = new EzyNioServerBootstrap();
    bootstrap.setResponseApi(responseApi);
    bootstrap.setStreamingApi(streamingApi);
    bootstrap.setStreamQueue(streamQueue);
    bootstrap.setSocketDataReceiver(socketDataReceiver);
    bootstrap.setHandlerGroupManager(handlerGroupManager);
    bootstrap.setSocketDisconnectionQueue(socketDisconnectionQueue);
    bootstrap.setSocketSessionTicketsQueue(socketSessionTicketsQueue);
    bootstrap.setWebsocketSessionTicketsQueue(websocketSessionTicketsQueue);
    bootstrap.setSocketSessionTicketsRequestQueues(sessionTicketsRequestQueues);
    bootstrap.setSslContext(newSslContext(getWebsocketSetting().getSslConfig()));
    return bootstrap;
}
Also used : EzyHandlerGroupBuilderFactory(com.tvd12.ezyfoxserver.nio.factory.EzyHandlerGroupBuilderFactory) EzyHandlerGroupManager(com.tvd12.ezyfoxserver.nio.wrapper.EzyHandlerGroupManager) EzySocketDataReceiver(com.tvd12.ezyfoxserver.nio.socket.EzySocketDataReceiver) ExecutorService(java.util.concurrent.ExecutorService) EzyStreamingApi(com.tvd12.ezyfoxserver.api.EzyStreamingApi) EzyCodecFactory(com.tvd12.ezyfoxserver.codec.EzyCodecFactory) EzyResponseApi(com.tvd12.ezyfoxserver.api.EzyResponseApi) EzyNioServerBootstrap(com.tvd12.ezyfoxserver.nio.EzyNioServerBootstrap)

Aggregations

EzyStreamingApi (com.tvd12.ezyfoxserver.api.EzyStreamingApi)6 EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)3 EzySimpleSettings (com.tvd12.ezyfoxserver.setting.EzySimpleSettings)3 Test (org.testng.annotations.Test)3 EzyResponseApi (com.tvd12.ezyfoxserver.api.EzyResponseApi)2 EzyStreamBytesImpl (com.tvd12.ezyfoxserver.command.impl.EzyStreamBytesImpl)2 EzySession (com.tvd12.ezyfoxserver.entity.EzySession)2 EzyNioServerBootstrap (com.tvd12.ezyfoxserver.nio.EzyNioServerBootstrap)2 EzyHandlerGroupManager (com.tvd12.ezyfoxserver.nio.wrapper.EzyHandlerGroupManager)2 EzySimpleBytesPackage (com.tvd12.ezyfoxserver.socket.EzySimpleBytesPackage)2 EzyCodecFactory (com.tvd12.ezyfoxserver.codec.EzyCodecFactory)1 EzySimpleConfig (com.tvd12.ezyfoxserver.config.EzySimpleConfig)1 EzySimpleServerContext (com.tvd12.ezyfoxserver.context.EzySimpleServerContext)1 EzyHandlerGroupBuilderFactory (com.tvd12.ezyfoxserver.nio.factory.EzyHandlerGroupBuilderFactory)1 EzySocketDataReceiver (com.tvd12.ezyfoxserver.nio.socket.EzySocketDataReceiver)1 EzyBytesPackage (com.tvd12.ezyfoxserver.response.EzyBytesPackage)1 EzyEventControllersSetting (com.tvd12.ezyfoxserver.setting.EzyEventControllersSetting)1 EzySimpleEventControllersSetting (com.tvd12.ezyfoxserver.setting.EzySimpleEventControllersSetting)1 EzySimpleStreamingSetting (com.tvd12.ezyfoxserver.setting.EzySimpleStreamingSetting)1 EzyEventControllers (com.tvd12.ezyfoxserver.wrapper.EzyEventControllers)1