org.tio.server.intf.ServerAioListener Java Examples

The following examples show how to use org.tio.server.intf.ServerAioListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TioServerBootstrap.java    From t-io with Apache License 2.0 6 votes vote down vote up
public TioServerBootstrap(TioServerProperties serverProperties,
                          TioServerClusterProperties clusterProperties,
                          TioServerSslProperties serverSslProperties,
                          RedissonTioClusterTopic redissonTioClusterTopic,
                          IpStatListener ipStatListener,
                          GroupListener groupListener,
                          ServerAioHandler serverAioHandler,
                          ServerAioListener serverAioListener) {
    this.serverProperties = serverProperties;
    this.clusterProperties = clusterProperties;
    this.serverSslProperties = serverSslProperties;

    logger.debug(serverSslProperties.toString());
    if (redissonTioClusterTopic == null) {
        logger.info("cluster mod closed");
    }
    this.redissonTioClusterTopic = redissonTioClusterTopic;
    this.ipStatListener = ipStatListener;
    this.groupListener = groupListener;
    this.serverAioListener = serverAioListener;
    this.serverAioHandler = serverAioHandler;
    afterSetProperties();
}
 
Example #2
Source File: BlockServerStarter.java    From md_blockchain with Apache License 2.0 5 votes vote down vote up
@PostConstruct
public void serverStart() throws IOException {
    ServerAioHandler serverAioHandler = new BlockServerAioHandler();
    ServerAioListener serverAioListener = new BlockServerAioListener();
    ServerGroupContext serverGroupContext = new ServerGroupContext(serverAioHandler, serverAioListener);
    AioServer aioServer = new AioServer(serverGroupContext);
    //本机启动服务
    aioServer.start(null, Const.PORT);
}
 
Example #3
Source File: ServerTioConfig.java    From t-io with Apache License 2.0 4 votes vote down vote up
/**
 * @return the serverAioListener
 */
public ServerAioListener getServerAioListener() {
	return serverAioListener;
}
 
Example #4
Source File: ServerTioConfig.java    From t-io with Apache License 2.0 4 votes vote down vote up
public void setServerAioListener(ServerAioListener serverAioListener) {
	this.serverAioListener = serverAioListener;
}
 
Example #5
Source File: ServerTioConfig.java    From t-io with Apache License 2.0 3 votes vote down vote up
/**
 * 
 * @param name
 * @param serverAioHandler
 * @param serverAioListener
 * @param tioExecutor
 * @param groupExecutor
 * @author: tanyaowu
 */
public ServerTioConfig(String name, ServerAioHandler serverAioHandler, ServerAioListener serverAioListener, SynThreadPoolExecutor tioExecutor,
        ThreadPoolExecutor groupExecutor) {
	super(tioExecutor, groupExecutor);
	this.ipBlacklist = new IpBlacklist(id, this);
	init(name, serverAioHandler, serverAioListener, tioExecutor, groupExecutor);
}
 
Example #6
Source File: ServerTioConfig.java    From t-io with Apache License 2.0 2 votes vote down vote up
/**
 * 
 * @param serverAioHandler
 * @param serverAioListener
 * @author: tanyaowu
 */
public ServerTioConfig(ServerAioHandler serverAioHandler, ServerAioListener serverAioListener) {
	this(null, serverAioHandler, serverAioListener);
}
 
Example #7
Source File: ServerTioConfig.java    From t-io with Apache License 2.0 2 votes vote down vote up
/**
 * 
 * @param name
 * @param serverAioHandler
 * @param serverAioListener
 * @author: tanyaowu
 */
public ServerTioConfig(String name, ServerAioHandler serverAioHandler, ServerAioListener serverAioListener) {
	this(name, serverAioHandler, serverAioListener, null, null);
}
 
Example #8
Source File: ServerTioConfig.java    From t-io with Apache License 2.0 2 votes vote down vote up
/**
 * 
 * @param serverAioHandler
 * @param serverAioListener
 * @param tioExecutor
 * @param groupExecutor
 * @author: tanyaowu
 */
public ServerTioConfig(ServerAioHandler serverAioHandler, ServerAioListener serverAioListener, SynThreadPoolExecutor tioExecutor, ThreadPoolExecutor groupExecutor) {
	this(null, serverAioHandler, serverAioListener, tioExecutor, groupExecutor);
}