@OnWebSocketConnect
    public void onConnect(Session session)
    {
        lastReceived = Instant.now();
        wsSession = session;
        final PacketDeliverer backupDeliverer = NettyClientConnectionHandler.BACKUP_PACKET_DELIVERY_ENABLED.getValue() ? new OfflinePacketDeliverer() : null;
        wsConnection = new WebSocketConnection(this, backupDeliverer, (InetSocketAddress) session.getRemoteAddress()); // TODO can't assume InetSocketAddress
        websocketFramePingTask = new WebsocketFramePingTask();
        if (KEEP_ALIVE_FRAME_PING_ENABLED_PROPERTY.getValue()) {
            // Run the task every 10% of the interval, to get the timing roughly in-line with the configured interval.
            final Duration taskInterval = KEEP_ALIVE_FRAME_PING_INTERVAL_PROPERTY.getValue().dividedBy(10);
            TaskEngine.getInstance().schedule(websocketFramePingTask, taskInterval, taskInterval);
        }

        final Duration maxIdleTime = getMaxIdleTime();
        xmppSessionIdleTask = new XmppSessionIdleTask();
        if (!maxIdleTime.isNegative() && !maxIdleTime.isZero()) {
            TaskEngine.getInstance().schedule(xmppSessionIdleTask, maxIdleTime.dividedBy(10), maxIdleTime.dividedBy(10));
        }

        wsConnection.setStanzaHandler(new WebSocketClientStanzaHandler(XMPPServer.getInstance().getPacketRouter(), wsConnection));
    }
Controls if clients that do websockets without the required XMPP framing will get their 'stream' element names
replaced, so that they are able to connect.

@see <a href="https://igniterealtime.atlassian.net/browse/OF-2479">OF-2479: Allow Tsung to test with websockets</a>
xmppserver/src/main/java/org/jivesoftware/openfire/websocket/WebSocketClientConnectionHandler.java