public void process(String stanza, XMPPPacketReader reader) throws Exception {
        if (isStartOfStream(stanza) || !sessionCreated) {
            initiateSession(stanza, reader);
        } else {
            processStanza(stanza, reader);
        }
    }
Creates a dedicated reader for a socket.

@param router     the router for sending packets that were read.
@param connection the connection being read.
xmppserver/src/main/java/org/jivesoftware/openfire/net/StanzaHandler.java