@Override
    public void handlerAdded(ChannelHandlerContext ctx) {
        Log.trace("Netty XMPP handler added: {}", ctx.channel().remoteAddress() == null ? ctx.channel().localAddress() : ctx.channel().localAddress() + "--" + ctx.channel().remoteAddress());

        // Create a new XML parser for the new connection. The parser will be used by the XMPPDecoder filter.
        ctx.channel().attr(XML_PARSER).set(new XMLLightweightParser());

        // Create a new Connection for the new session
        final NettyConnection nettyConnection = createNettyConnection(ctx);
        ctx.channel().attr(CONNECTION).set(nettyConnection);
        ctx.channel().attr(READ_BYTES).set(0L);

        ctx.channel().attr(HANDLER).set(createStanzaHandler(nettyConnection));
    }
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