سؤال

I'm working on a project which uses Atmosphere Framework jQuery-jersey-pubsub. I wish to track the size of my messages and Atmosphere already has the feature, namely TrackMessageSizeFilter. I have included this file on the server, also I have set trackMessageLength: true on my client. I have also included the entry

<init-param>
    <param-name>org.atmosphere.cpr.broadcastFilterClasses</param-name>
    <param-value>org.atmosphere.client.TrackMessageSizeFilter</param-value>
</init-param>

I have also tried

<init-param>
    <param-name>org.atmosphere.cpr.broadcastFilterClasses</param-name>
    <param-value>com.mypackage.TrackMessageSizeFilter</param-value>
</init-param>

Neither seems to append the message size to my messages. How do I acheive that?

هل كانت مفيدة؟

المحلول

use the TrackMessageSizeInterceptor instead by just installing it via the init-param.

https://github.com/Atmosphere/atmosphere/wiki/Multiple-messages-arrive-as-single-response-body-or-message-received-are-incomplete

-- Jeanfrancois

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top