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

com.github.houbbbbb.sso.nt.factory.InitializerFactory Maven / Gradle / Ivy

The newest version!
package com.github.houbbbbb.sso.nt.factory;

import com.github.houbbbbb.sso.nt.initiallizer.ClientChannelInitializer;
import com.github.houbbbbb.sso.nt.initiallizer.ServerChannelInitializer;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;

/**
 * @todo:
 * @author: hbw
 * @date: 2020/7/7
 **/
public class InitializerFactory extends AbstractFactory {
    @Override
    public ChannelInitializer getInitializer(ItemType name) {
        ChannelInitializer ci = null;
        switch (name) {
            case SERVER_INITIALIZER: ci = new ServerChannelInitializer(); break;
            case CLIENT_INITIALIZER: ci = new ClientChannelInitializer(); break;
            default: break;
        }
        return ci;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy