NettyServer extends AbstractNetServer { NettyServer(Attribute attribute, HodorChannelHandler handler) { super(attribute, handler); init(); } NettyServer(Attribute attribute, HodorChannelHandler handler); @Override void bind(); @Override void close();  }
@Test public void testNettyServer() { Attribute attribute = new Attribute(); attribute.put(RemotingConst.HOST_KEY, "127.0.0.1"); attribute.put(RemotingConst.PORT_KEY, 8080); HodorServerChannelHandler handler = new HodorServerChannelHandler(); NetServerTransport netServerTransport = ExtensionLoader.getExtensionLoader(NetServerTransport.class).getDefaultJoin(); NetServer netServer = netServerTransport.bind(attribute, handler); netServer.bind(); }