blob: a26c60e3b180114189373b247fd7a22458e3ca54 [file] [log] [blame]
{ "type": "class",
"qname": "mx.messaging.Consumer",
"baseClassname": "mx.messaging.AbstractConsumer"
,
"description": "A Consumer subscribes to a destination to receive messages. Consumers send subscribe and unsubscribe messages which generate a MessageAckEvent or MessageFaultEvent depending upon whether the operation was successful or not. Once subscribed, a Consumer dispatches a MessageEvent for each message it receives. Consumers provide the ability to filter messages using a selector. These selectors must be understood by the destination. <p> The &lt;mx:Consumer&gt; tag inherits all the tag attributes of its superclass, and adds the following tag attributes: </p> <pre>\\n &lt;mx:Consumer\\n <b>Properties</b>\\n resubscribeAttempts=&quot;<i>5</i>&quot;\\n resubscribeInterval=&quot;<i>5000</i>&quot;\\n selector=&quot;<i>No default.</i>&quot;\\n timestamp=&quot;<i>No default.</i>&quot;\\n /&gt;\\n </pre>",
"tags": [
{ "tagName": "mxml",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.messaging.Consumer",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor. hosting the remote destination the Consumer will subscribe to. This parameter is deprecated and it is ignored by the constructor. <listing version=&quot;3.0&quot;> function initConsumer():void { var consumer:Consumer = new Consumer(); consumer.destination = &quot;NASDAQ&quot;; consumer.selector = &quot;operation IN ('Bid','Ask')&quot;; consumer.addEventListener(MessageEvent.MESSAGE, messageHandler); consumer.subscribe(); } function messageHandler(event:MessageEvent):void { var msg:IMessage = event.message; var info:Object = msg.body; trace(&quot;-App recieved message: &quot; + msg.toString()); } </listing>",
"tags": [
{ "tagName": "param",
"values": ["messageType The alias for the message type processed by the service"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "example",
"values": []},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": [{ "name": "messageType", "type": "String"}]}
,
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "selector",
"namespace": "public",
"bindable": ["propertyChange"],
"details": [],
"deprecated": {},
"description": "The selector for the Consumer. This is an expression that is passed to the destination which uses it to filter the messages delivered to the Consumer. <p>Before a call to the <code>subscribe()</code> method, this property can be set with no side effects. After the Consumer has subscribed to its destination, changing this value has the side effect of updating the Consumer's subscription to use the new selector expression immediately.</p> <p>The remote destination must understand the value of the selector expression.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "subtopic",
"namespace": "public",
"bindable": ["propertyChange"],
"details": [],
"deprecated": {},
"description": "Provides access to the subtopic for the remote destination that the MessageAgent uses.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
,
"events": [
{ "qname": "message",
"type": "mx.messaging.events.MessageEvent"
,
"description": "Dispatched when a message is received by the Consumer.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.messaging.events.MessageEvent.MESSAGE"]},
{ "tagName": "productversion",
"values": ["BlazeDS 4", "LCDS 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}