Packagecom.asfusion.mate.actionLists
Classpublic class MessageHandlers
InheritanceMessageHandlers Inheritance AbstractHandlers Inheritance flash.events.EventDispatcher

The MessageHandlers tag allows you to register a set of handlers as a consumer of a Flex Messaging Service. All the tags inside the MessageHandlers tag will be executed in order when a Message matching the criteria is received. This tag accepts the same attributes as the Consumer tag.



Public Properties
 PropertyDefined by
 Inheritedactions : Array
An array of Actions (IAction) contained in this IActionList.
AbstractHandlers
  autoSubscribe : Boolean
If this flag is true the consumer will be automatically subscribed when the MessageHandlers is created.
MessageHandlers
 Inheriteddebug : Boolean
Whether to show debugging information for this IActionList.
AbstractHandlers
  destination : String
Provides access to the destination for the MessageAgent.
MessageHandlers
 InheriteddispatcherType : String
String that defines whether the dispatcher used by this tag is global or inherit.
AbstractHandlers
  faultHandlers : Array
An array of actions (IAction) contained in this fault action-list.
MessageHandlers
  resubscribeAttempts : int
The number of resubscribe attempts that the Consumer makes in the event that the destination is unavailable or the connection to the destination fails.
MessageHandlers
  resubscribeInterval : int
The number of milliseconds between resubscribe attempts.
MessageHandlers
 Inheritedscope : IScope
Returns the current scope for this IActionList
AbstractHandlers
  selector : String
The selector for the Consumer.
MessageHandlers
  subtopic : String
Provides access to the subtopic for the remote destination that the MessageAgent uses.
MessageHandlers
Protected Properties
 PropertyDefined by
  consumer : Consumer
An internal reference to the Consumer instance
MessageHandlers
 InheritedcurrentDispatcher : IEventDispatcher
AbstractHandlers
 InheriteddispatcherTypeChanged : Boolean
Flag indicating whether the dispatcherType has been changed and needs invalidation.
AbstractHandlers
 Inheriteddocument : Object
Internal storage for the document object.
AbstractHandlers
 InheritedinheritedScope : IScope
Parent scope that is passed to the IActionList when it is a sub-ActionList.
AbstractHandlers
 Inheritedmanager : IMateManager
Internal instance of IMateManager.
AbstractHandlers
 Inheritedmap : IEventMap
Internal instance of IEventMap.
AbstractHandlers
Public Methods
 MethodDefined by
  
Constructor
MessageHandlers
  
Unregister as a listener and prepare to be garbage collected
MessageHandlers
  
errorString():String
Retuns an error String to be used by the debugger.
MessageHandlers
  
getConsumer():Consumer
Returns an instance of the Consumer used in this MessageHandlers
MessageHandlers
 Inherited
getDocument():Object
A reference to the document object associated with this IActionList.
AbstractHandlers
 Inherited
getGroupId():int
Method to get the group id.
AbstractHandlers
 Inherited
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the IActionList is set up using a tag.
AbstractHandlers
 Inherited
Marks a component so that its commitProperties method gets called during a later screen update.
AbstractHandlers
 Inherited
setDispatcher(value:IEventDispatcher, local:Boolean = true):void
A method that allows setting the dispatcher that this IActionList will use to register to events.
AbstractHandlers
 Inherited
setGroupId(id:int):void
Method to set the group id.
AbstractHandlers
 Inherited
setInheritedScope(inheritedScope:IScope):void
You can pass the parent scope to this IActionList to copy the inherited values.
AbstractHandlers
  
subscribe(clientId:String = null):void
Subscribes to the remote destination.
MessageHandlers
  
unsubscribe():void
Unsubscribes from the remote destination.
MessageHandlers
 Inherited
validateNow():void
Validate and update the properties of this object, if necessary.
AbstractHandlers
Protected Methods
 MethodDefined by
  
Processes the properties set on the component.
MessageHandlers
 Inherited
A handler for the mate dispatcher changed.
AbstractHandlers
  
fireEvent(event:MessageEvent):void
Called by the consumer when the message event gets triggered.
MessageHandlers
  
fireFaultEvent(event:MessageFaultEvent):void
Called by the consumer when the fault event gets triggered.
MessageHandlers
 Inherited
runSequence(scope:IScope, actionList:Array):void
Goes over all the listeners (IActions) and calls the method trigger on them, passing the scope as an argument.
AbstractHandlers
 Inherited
setScope(scope:IScope):void
Set the scope on this IActionList.
AbstractHandlers
Events
 EventSummaryDefined by
 Inherited
end
This event is dispatched right after all the IActions have been called, when the IActionList ends execution (although this event might be dispatched before asynchronous calls have returned).AbstractHandlers
 Inherited This event is dispatched right before the list of IActions are called, when the IActionList starts execution.AbstractHandlers
Property detail
autoSubscribeproperty
autoSubscribe:Boolean  [read-write]

If this flag is true the consumer will be automatically subscribed when the MessageHandlers is created.

Implementation
    public function get autoSubscribe():Boolean
    public function set autoSubscribe(value:Boolean):void
consumerproperty 
protected var consumer:Consumer

An internal reference to the Consumer instance

destinationproperty 
destination:String  [read-write]

Provides access to the destination for the MessageAgent. Changing the destination will disconnect the MessageAgent if it is currently connected.

Implementation
    public function get destination():String
    public function set destination(value:String):void
faultHandlersproperty 
faultHandlers:Array  [read-write]

An array of actions (IAction) contained in this fault action-list. If the consumer dispatches a faultEvent, the handlers are processed in the order in which they were added to the list.

The default value is null.

Implementation
    public function get faultHandlers():Array
    public function set faultHandlers(value:Array):void
resubscribeAttemptsproperty 
resubscribeAttempts:int  [read-write]

The number of resubscribe attempts that the Consumer makes in the event that the destination is unavailable or the connection to the destination fails. A value of -1 enables infinite attempts. A value of zero disables resubscribe attempts.

Resubscribe attempts are made at a constant rate according to the resubscribe interval value. When a resubscribe attempt is made if the underlying channel for the Consumer is not connected or attempting to connect the channel will start a connect attempt. Subsequent Consumer resubscribe attempts that occur while the underlying channel connect attempt is outstanding are effectively ignored until the outstanding channel connect attempt succeeds or fails.

Implementation
    public function get resubscribeAttempts():int
    public function set resubscribeAttempts(value:int):void
resubscribeIntervalproperty 
resubscribeInterval:int  [read-write]

The number of milliseconds between resubscribe attempts. If a Consumer doesn't receive an acknowledgement for a subscription request, it will wait the specified number of milliseconds before attempting to resubscribe. Setting the value to zero disables resubscriptions.

Resubscribe attempts are made at a constant rate according to this value. When a resubscribe attempt is made if the underlying channel for the Consumer is not connected or attempting to connect the channel will start a connect attempt. Subsequent Consumer resubscribe attempts that occur while the underlying channel connect attempt is outstanding are effectively ignored until the outstanding channel connect attempt succeeds or fails.

Implementation
    public function get resubscribeInterval():int
    public function set resubscribeInterval(value:int):void
selectorproperty 
selector:String  [read-write]

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.

Before a call to the subscribe() 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.

The remote destination must understand the value of the selector expression.

Implementation
    public function get selector():String
    public function set selector(value:String):void
subtopicproperty 
subtopic:String  [read-write]

Provides access to the subtopic for the remote destination that the MessageAgent uses.

Implementation
    public function get subtopic():String
    public function set subtopic(value:String):void
Constructor detail
MessageHandlers()constructor
public function MessageHandlers()

Constructor

Method detail
clearReferences()method
public override function clearReferences():void

Unregister as a listener and prepare to be garbage collected

commitProperties()method 
protected override function commitProperties():void

Processes the properties set on the component.

errorString()method 
public override function errorString():String

Retuns an error String to be used by the debugger.

Returns
String
fireEvent()method 
protected function fireEvent(event:MessageEvent):void

Called by the consumer when the message event gets triggered. This method creates a scope and then runs the sequence.

Parameters
event:MessageEvent
fireFaultEvent()method 
protected function fireFaultEvent(event:MessageFaultEvent):void

Called by the consumer when the fault event gets triggered. This method creates a scope and then runs the sequence.

Parameters
event:MessageFaultEvent
getConsumer()method 
public function getConsumer():Consumer

Returns an instance of the Consumer used in this MessageHandlers

Returns
Consumer
subscribe()method 
public function subscribe(clientId:String = null):void

Subscribes to the remote destination.

Parameters
clientId:String (default = null)
unsubscribe()method 
public function unsubscribe():void

Unsubscribes from the remote destination. In the case of durable JMS subscriptions, this will destroy the durable subscription on the JMS server.