我找到了实现新承诺的两种方法
http://netty.io/4.1/api/io/netty/channel/ChannelOutboundInvoker.html#newPromise()
这种方式需要一个现有的频道实例
http://netty.io/4.1/api/io/netty/util/concurrent/DefaultPromise.html#DefaultPromise()
此方法受保护
我是否可以在没有渠道的情况下提出通用承诺?
最佳答案
EventExecutor.newPromise()
。
也可以看看:
http://netty.io/4.1/api/io/netty/util/concurrent/EventExecutor.html#newPromise()