了解 AMF 轮询呼叫 [英] Understanding an AMF Polling call
问题描述
我的一位测试人员向我询问我们在应用中进行的 AMF 投票:
One of my testers is asking me about an AMF polling that we do in our app:
flex_amf_call(
"AMF3_call_12",
"Gateway=http://test.url.com:22000/InventoryTesting/boa/messagebroker/amfpolling",
"Snapshot=t19.inf",
MESSAGE,
"Method=null",
"TargetObjectId=/7",
BEGIN_ARGUMENTS,
"<AMF3><object-externalizable-custom><flex.messaging.messages.CommandMessage>\n "
"<destination>InvTestMessaging</destination>\n <messageId>"
"4AF91854-F89E-F56D-EE22-4EC8BBAEA4BC</messageId>\n <timestamp>0</timestamp>\n "
"<timeToLive>0</timeToLive>\n <headers>\n <entry>\n <string>"
"DSEndpoint</string>\n <string>my-polling-amf</string>\n </entry>\n "
"<entry>\n <string>DSId</string>\n <string>{ParamDSValue_string}"
"</string>\n </entry>\n </headers>\n <body serialization=\"custom\" class="
"\"flex.messaging.io.amf.ASObject\">\n <unserializable-parents/>\n <map>\n "
" <default>\n <loadFactor>0.75</loadFactor>\n <threshold>"
"12</threshold>\n </default>\n <int>16</int>\n <int>0</int>\n "
"</map>\n <flex.messaging.io.amf.ASObject>\n <default>\n "
"<inHashCode>false</inHashCode>\n <inToString>false</inToString>\n "
"</default>\n </flex.messaging.io.amf.ASObject>\n </body>\n <correlationId/>"
"\n <operation>0</operation>\n</flex.messaging.messages.CommandMessage>"
"</object-externalizable-custom></AMF3>",
END_ARGUMENTS,
LAST);
这个节点是什么意思?
<operation>
他们看到的值为 0 和 5.
They are seeing values of 0 and 5.
推荐答案
操作为 0 的 CommandMessage
是订阅"操作,在与服务器发起会话时自动发送在某些情况下.操作为 5 的 CommandMessage
是ping"操作,服务器必须以适当填充的 AcknowledgeMessage
进行响应,否则 AMF 通信将终止.CommandMessage
由 flash 播放器根据需要自动发送,您使用的任何服务器都应适当配置为自动处理它们,或为它们的处理提供钩子(如登录和注销操作).
A CommandMessage
with an operation of 0 is a "subscribe" operation, and is sent automatically when a session is initiated with the server under certain circumstances. A CommandMessage
with an operation of 5 is a "ping" operation, and the server must respond with an appropriately populated AcknowledgeMessage
or AMF communication is terminated. A CommandMessage
is automatically sent by the flash player as needed, and whatever server you're using should be appropriately configured to automatically handle them, or provide hooks for their handling (like with login and logout operations).
请参阅 http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/messages/CommandMessage.html 有关 CommandMessage
的更多详细信息.
See http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/messages/CommandMessage.html for more details about the CommandMessage
.
这篇关于了解 AMF 轮询呼叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!