问题描述
我的一个测试人员在问我关于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);
这是什么节点是什么意思?
What does this node mean?
<operation>
他们看到的0和5的值
They are seeing values of 0 and 5.
推荐答案
A CommandMessage
为0的操作是订阅操作,并自动发送时,会话开始于在某些情况下的服务器。 A CommandMessage
与5的操作是平的操作,服务器必须响应适当填充 AcknowledgeMessage的
或AMF的通信被终止。 A 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).
请参阅的有关详细信息, CommandMessage
。
See http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/messages/CommandMessage.html for more details about the CommandMessage
.
这篇关于了解一个AMF轮询呼叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!