@Override
    public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
        if (!sslInitDone && evt instanceof SslHandshakeCompletionEvent) {
            SslHandshakeCompletionEvent e = (SslHandshakeCompletionEvent) evt;

            if (e.isSuccess()) {
                sslInitDone = true;

                NettyConnection connection = ctx.channel().attr(NettyConnectionHandler.CONNECTION).get();
                connection.setEncrypted(true);
                Log.debug("TLS negotiation was successful on channel {}", ctx.channel().remoteAddress() == null ? ctx.channel().localAddress() : ctx.channel().localAddress() + "--" + ctx.channel().remoteAddress());
                ctx.fireChannelActive();
            }
        }

        super.userEventTriggered(ctx, evt);
    }
Returns the time that a connection can be idle before being closed.

@return the time a connection can be idle.
xmppserver/src/main/java/org/jivesoftware/openfire/nio/NettyConnectionHandler.java