@Override
    protected void serverStart() throws RemotingException {

        acceptor = new NioSocketAcceptor(); //TCP Acceptor

        // acceptor.getFilterChain().addFirst("logging", new MinaLoggingFilter());
        acceptor.getFilterChain().addLast("codec", new ProtocolCodecFilter(new MinaCodecFactory(getCodec())));
        acceptor.getFilterChain().addLast("mdc", new MdcInjectionFilter());

        acceptor.setHandler(new MinaHandler(this));
        IoSessionConfig cfg = acceptor.getSessionConfig();
        cfg.setReaderIdleTime(remotingServerConfig.getReaderIdleTimeSeconds());
        cfg.setWriterIdleTime(remotingServerConfig.getWriterIdleTimeSeconds());
        cfg.setBothIdleTime(remotingServerConfig.getServerChannelMaxIdleTimeSeconds());

        bindAddress = new InetSocketAddress(remotingServerConfig.getListenPort());
        try {
            acceptor.bind(bindAddress);
        } catch (IOException e) {
            throw new RemotingException("Start Mina server error", e);
        }
    }
@author Robert HG (254963746@qq.com) on 11/4/15.
lts-core/src/main/java/com/github/ltsopensource/remoting/mina/MinaRemotingServer.java