All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.godmao.netty.example.AirServer Maven / Gradle / Ivy

There is a newer version: 2.3.4.7.Beat
Show newest version
package cn.godmao.netty.example;

import cn.godmao.netty.ChannelService;
import cn.godmao.netty.handler.IConnect;
import cn.godmao.netty.handler.IConnectHandler;

/**
 * 统一服务创建
 */
public class AirServer implements IConnect {
    private final IConnect connect;

    public AirServer(IConnect connect) {
        this.connect = connect;
    }

    @Override
    public synchronized void start() {
        this.connect.start();
    }

    @Override
    public ChannelService getChannelService() {
        return this.connect.getChannelService();
    }

    @Override
    public IConnectHandler getConnectHandler() {
        return this.connect.getConnectHandler();
    }

    public static void main(String[] args) {
        AirServer server = new AirServer(new Server(10001));
        server.start();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy