ChannelPipeline pipeline = pipeline();
pipeline.addLast("groupHandler", groupHandler);
pipeline.addLast("timeoutHandler", new TimeoutHandler(timer, TIMEOUT));
pipeline.addLast("connectionLimit", new ConnectionLimitUpstreamHandler(IMAPServer.this.connectionLimit));
pipeline.addLast("connectionPerIpLimit", new ConnectionPerIpLimitUpstreamHandler(IMAPServer.this.connPerIP));
if (isSSLSocket()) {
// We need to set clientMode to false.
// See https://issues.apache.org/jira/browse/JAMES-1025
SSLEngine engine = getSSLContext().createSSLEngine();