class StreamManagementPacketRouter extends SessionPacketRouter {

    public static final String SM_UNSOLICITED_ACK_FREQUENCY = "stream.management.unsolicitedAckFrequency";
    static {
        JiveGlobals.migrateProperty(SM_UNSOLICITED_ACK_FREQUENCY);
    }

    private int unsolicitedAckFrequency = JiveGlobals.getIntProperty(SM_UNSOLICITED_ACK_FREQUENCY, 0);

    public StreamManagementPacketRouter(LocalClientSession session) {
        super(session);
    }

    @Override
    public void route(Element wrappedElement) throws UnknownStanzaException {<FILL_FUNCTION_BODY>}

    private boolean isUnsolicitedAckExpected() {
        if (!session.getStreamManager().isEnabled()) {
            return false;
        }
        return unsolicitedAckFrequency > 0 && session.getNumClientPackets() % unsolicitedAckFrequency == 0;
    }

}


        if (StreamManager.NAMESPACE_V3.equals(wrappedElement.getNamespace().getStringValue())) {
            session.getStreamManager().process(wrappedElement);
        } else if (CsiManager.isStreamManagementNonza(wrappedElement)) {
            session.getCsiManager().process(wrappedElement);
        } else {
            super.route(wrappedElement);
            if (isUnsolicitedAckExpected()) {
                session.getStreamManager().sendServerAcknowledgement();
            }
        }
    
<methods>public void <init>(org.jivesoftware.openfire.session.LocalClientSession) ,public static boolean isInvalidStanzaSentPriorToResourceBinding(Packet, org.jivesoftware.openfire.session.ClientSession) ,public void route(Element) throws org.jivesoftware.openfire.multiplex.UnknownStanzaException,public void route(Packet) ,public void route(IQ) ,public void route(Message) ,public void route(Presence) ,public void setSkipJIDValidation(boolean) <variables>private org.jivesoftware.openfire.PacketRouter router,protected org.jivesoftware.openfire.session.LocalClientSession session,private boolean skipJIDValidation