Package | com.asfusion.mate.actionLists |
Class | public class MessageHandlers |
Inheritance | MessageHandlers AbstractHandlers flash.events.EventDispatcher |
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.
Property | Defined by | ||
---|---|---|---|
actions : 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 | ||
debug : Boolean
Whether to show debugging information for this IActionList.
| AbstractHandlers | ||
destination : String
Provides access to the destination for the
MessageAgent . | MessageHandlers | ||
dispatcherType : 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 | ||
scope : 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 |
Property | Defined by | ||
---|---|---|---|
consumer : Consumer
An internal reference to the Consumer instance
| MessageHandlers | ||
currentDispatcher : IEventDispatcher | AbstractHandlers | ||
dispatcherTypeChanged : Boolean
Flag indicating whether the
dispatcherType has been changed and needs invalidation. | AbstractHandlers | ||
document : Object
Internal storage for the document object.
| AbstractHandlers | ||
inheritedScope : IScope
Parent scope that is passed to the IActionList when it is a sub-ActionList.
| AbstractHandlers | ||
manager : IMateManager
Internal instance of
IMateManager . | AbstractHandlers | ||
map : IEventMap
Internal instance of
IEventMap . | AbstractHandlers |
Method | Defined by | ||
---|---|---|---|
Constructor
| MessageHandlers | ||
clearReferences():void
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 | ||
getDocument():Object
A reference to the document object associated with this IActionList.
| AbstractHandlers | ||
getGroupId():int
Method to get the group id.
| AbstractHandlers | ||
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the IActionList is set up using a tag.
| AbstractHandlers | ||
invalidateProperties():void
Marks a component so that its
commitProperties method gets called during a later screen update. | AbstractHandlers | ||
setDispatcher(value:IEventDispatcher, local:Boolean = true):void
A method that allows setting the dispatcher
that this IActionList will use to register to events.
| AbstractHandlers | ||
setGroupId(id:int):void
Method to set the group id.
| AbstractHandlers | ||
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 | ||
validateNow():void
Validate and update the properties of this object, if necessary.
| AbstractHandlers |
Method | Defined by | ||
---|---|---|---|
commitProperties():void
Processes the properties set on the component.
| MessageHandlers | ||
dispatcherChangeHandler(event:DispatcherEvent):void
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 | ||
runSequence(scope:IScope, actionList:Array):void
Goes over all the listeners (
IAction s)
and calls the method trigger on them, passing the scope as an argument. | AbstractHandlers | ||
Set the scope on this IActionList.
| AbstractHandlers |
autoSubscribe | property |
autoSubscribe:Boolean
[read-write]
If this flag is true the consumer will be automatically subscribed when the MessageHandlers
is created.
public function get autoSubscribe():Boolean
public function set autoSubscribe(value:Boolean):void
consumer | property |
protected var consumer:Consumer
An internal reference to the Consumer instance
destination | property |
destination:String
[read-write]
Provides access to the destination for the MessageAgent
. Changing the destination will disconnect the
MessageAgent
if it is currently connected.
public function get destination():String
public function set destination(value:String):void
faultHandlers | property |
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
.
public function get faultHandlers():Array
public function set faultHandlers(value:Array):void
resubscribeAttempts | property |
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
resubscribeInterval | property |
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
selector | property |
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
subtopic | property |
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
MessageHandlers | () | constructor |
public function MessageHandlers()
Constructor
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.
ReturnsString |
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.
Parametersevent: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.
Parametersevent:MessageFaultEvent |
getConsumer | () | method |
public function getConsumer():Consumer
Returns an instance of the Consumer
used in this MessageHandlers
Consumer |
subscribe | () | method |
public function subscribe(clientId:String = null):void
Subscribes to the remote destination.
ParametersclientId: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.