| Package | mx.messaging |
| Class | public class Producer |
| Inheritance | Producer AbstractProducer MessageAgent flash.events.EventDispatcher |
| Subclasses | AsyncRequest |
| Language Version : | ActionScript 3.0 |
| Product Versions : | BlazeDS 4, LCDS 3 |
| Runtime Versions : | Flash Player 9, AIR 1.1 |
Hide MXML SyntaxThe <mx:Producer> tag inherits all the tag attributes of its superclass, and adds the following tag attributes:
<mx:Producer
Properties
defaultHeaders="No default."
/>
| Property | Defined By | ||
|---|---|---|---|
![]() | authenticated : Boolean [read-only]
Indicates if this MessageAgent is using an authenticated connection to
its destination. | MessageAgent | |
![]() | autoConnect : Boolean
If true the Producer automatically connects to its destination the
first time the send() method is called. | AbstractProducer | |
![]() | channelSet : ChannelSet
Provides access to the ChannelSet used by the MessageAgent. | MessageAgent | |
![]() | clientId : String [read-only]
Provides access to the client id for the MessageAgent. | MessageAgent | |
![]() | connected : Boolean [read-only]
Indicates whether this MessageAgent is currently connected to its
destination via its ChannelSet. | MessageAgent | |
![]() | defaultHeaders : Object
The default headers to apply to messages sent by the Producer. | AbstractProducer | |
![]() | destination : String
Provides access to the destination for the MessageAgent. | MessageAgent | |
![]() | priority : int
The default message priority for the messages sent by the Producer. | AbstractProducer | |
![]() | reconnectAttempts : int
The number of reconnect attempts that the Producer makes in the event
that the destination is unavailable or the connection to the destination closes. | AbstractProducer | |
![]() | reconnectInterval : int
The number of milliseconds between reconnect attempts. | AbstractProducer | |
![]() | requestTimeout : int
Provides access to the request timeout in seconds for sent messages. | MessageAgent | |
| subtopic : String
Provides access to the subtopic for the remote destination that the MessageAgent uses. | Producer | ||
| Method | Defined By | ||
|---|---|---|---|
Producer()
Constructor. | Producer | ||
![]() |
Invoked by a MessageResponder upon receiving a result for a sent
message. | MessageAgent | |
![]() | channelConnectHandler(event:ChannelEvent):void
Handles a CONNECT ChannelEvent. | MessageAgent | |
![]() | channelDisconnectHandler(event:ChannelEvent):void
Handles a DISCONNECT ChannelEvent. | MessageAgent | |
![]() | channelFaultHandler(event:ChannelFaultEvent):void
Handles a ChannelFaultEvent. | MessageAgent | |
![]() | connect():void
Connects the Producer to its target destination. | AbstractProducer | |
![]() | disconnect():void [override]
Disconnects the Producer from its remote destination. | AbstractProducer | |
![]() |
Invoked by a MessageResponder upon receiving a fault for a sent message. | MessageAgent | |
![]() | hasPendingRequestForMessage(msg:IMessage):Boolean
Returns true if there are any pending requests for the passed in message. | MessageAgent | |
![]() | initialized(document:Object, id:String):void
Called after the implementing object has been created
and all properties specified on the tag have been assigned. | MessageAgent | |
![]() | logout():void
Logs the MessageAgent out from its remote destination. | MessageAgent | |
![]() |
Sends the specified message to its destination. | AbstractProducer | |
![]() | setCredentials(username:String, password:String, charset:String = null):void
Sets the credentials that the MessageAgent uses to authenticate to
destinations. | MessageAgent | |
![]() | setRemoteCredentials(username:String, password:String, charset:String = null):void
Sets the remote credentials that will be passed through to the remote destination
for authenticating to secondary systems. | MessageAgent | |
| Constant | Defined By | ||
|---|---|---|---|
| DEFAULT_PRIORITY : int = 4 [static]
The default message priority. | Producer | ||
| subtopic | property |
subtopic:String| Language Version : | ActionScript 3.0 |
| Product Versions : | BlazeDS 4, LCDS 3 |
| Runtime Versions : | Flash Player 9, AIR 1.1 |
Provides access to the subtopic for the remote destination that the MessageAgent uses.
This property can be used as the source for data binding.
public function get subtopic():String public function set subtopic(value:String):void| Producer | () | Constructor |
public function Producer()| Language Version : | ActionScript 3.0 |
| Product Versions : | BlazeDS 4, LCDS 3 |
| Runtime Versions : | Flash Player 9, AIR 1.1 |
Constructor.
function sendMessage():void
{
var producer:Producer = new Producer();
producer.destination = "NASDAQ";
var msg:AsyncMessage = new AsyncMessage();
msg.headers.operation = "UPDATE";
msg.body = {"SYMBOL":50.00};
producer.send(msg);
}
| DEFAULT_PRIORITY | Constant |
public static const DEFAULT_PRIORITY:int = 4| Language Version : | ActionScript 3.0 |
| Product Versions : | BlazeDS 4, LCDS 3 |
| Runtime Versions : | Flash Player 9, AIR 1.1 |
The default message priority.