对于 ssl 握手超时示例,如何调用 ImmediateExecutor.INSTANCE 因为它是包保护的
final Timer timer = new HashedWheelTimer();
final SslBufferPool pool = new SslBufferPool();
final class MyChannelPipelineFactory implements ChannelPipelineFactory {
public ChannelPipeline getPipeline() {
ChannelPipeline cp = Channels.pipeline();
SslEngine engine = ...
// Use a handshake timeout of 10 seconds
SslHandler handler = new SslHandler(engine, pool, false, ImmediateExecutor.INSTANCE, timer, 10000);
cp.addFirst("ssl", handler);
return cp;
}
}