mx.messaging

# AdvancedChannelSet - AS3 ADEP Data Services

Package | mx.messaging
Class | public class AdvancedChannelSet
Inheritance | AdvancedChannelSet ChannelSet EventDispatcher Object

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Extends the base ChannelSet to add advanced messaging functionality.

Default MXML Property `channels`

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | authenticated : Boolean [read-only] Indicates whether the ChannelSet has an underlying Channel that successfully authenticated with its endpoint. | ChannelSet
|  | channelIds : Array [read-only] The ids of the Channels used by the ChannelSet. | ChannelSet
|  | channels : Array Provides access to the Channels in the ChannelSet. | ChannelSet
|  | clustered : Boolean Indicates whether the ChannelSet targets a clustered destination. | ChannelSet
|  | connected : Boolean [read-only] Indicates whether the ChannelSet is connected. | ChannelSet
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | currentChannel : Channel [read-only] Returns the current Channel for the ChannelSet. | ChannelSet
|  | heartbeatInterval : int The number of milliseconds between heartbeats sent to the remote host while this ChannelSet is actively connected but idle. | ChannelSet
|  | initialDestinationId : String Provides access to the initial destination this ChannelSet is used to access. | ChannelSet
|  | messageAgents : Array [read-only] Provides access to the set of MessageAgents that use this ChannelSet. | ChannelSet
|  | reliableReconnectDuration : int The duration in milliseconds that channels within the AdvancedChannelSet will attempt to reconnect in a reliable fashion to the remote endpoint they where previous connected to, before advancing to the normal automatic failover and protocol fallback algorithm. | AdvancedChannelSet

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | AdvancedChannelSet(channelIds:Array = null, clusteredWithURLLoadBalancing:Boolean = false) Constructs an AdvancedChannelSet. | AdvancedChannelSet
|  | addChannel(channel:Channel):void Adds a Channel to the ChannelSet. | ChannelSet
|  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. | EventDispatcher
|  | channelConnectHandler(event:ChannelEvent):void Handles a CONNECT ChannelEvent and redispatches the event. | ChannelSet
|  | channelDisconnectHandler(event:ChannelEvent):void Handles a DISCONNECT ChannelEvent and redispatches the event. | ChannelSet
|  | channelFaultHandler(event:ChannelFaultEvent):void Handles a ChannelFaultEvent and redispatches the event. | ChannelSet
|  | connect(agent:MessageAgent):void Connects a MessageAgent to the ChannelSet. | ChannelSet
|  | disconnect(agent:MessageAgent):void Disconnects a specific MessageAgent from the ChannelSet. | ChannelSet
|  | disconnectAll():void Disconnects all associated MessageAgents and disconnects any underlying Channel that is connected. | ChannelSet
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | hasEventListener(type:String):Boolean Checks whether the EventDispatcher object has any listeners registered for a specific type of event. | EventDispatcher
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | login(username:String, password:String, charset:String = null):mx.rpc:AsyncToken Authenticates the ChannelSet with the server using the provided credentials. | ChannelSet
|  | logout(agent:MessageAgent = null):mx.rpc:AsyncToken Logs the ChannelSet out from the server. | ChannelSet
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeChannel(channel:Channel):void Removes a Channel from the ChannelSet. | ChannelSet
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | send(agent:MessageAgent, message:IMessage):void Sends a message from a MessageAgent over the currently connected Channel. | ChannelSet
|  | setCredentials(credentials:String, agent:MessageAgent, charset:String = null):void Stores the credentials and passes them through to every connected channel. | ChannelSet
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String [override] Returns a String containing the ids of the Channels in the ChannelSet. | ChannelSet
|  | valueOf():Object Returns the primitive value of the specified object. | Object
|  | willTrigger(type:String):Boolean Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | EventDispatcher

Protected Methods
Hide Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined By
--- | --- | ---
|  | messageHandler(event:MessageEvent):void Redispatches message events from the currently connected Channel. | ChannelSet

Events
Click for more information on events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | activate | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher
|  | channelConnect | Dispatched after a Channel in the ChannelSet has connected to its endpoint. | ChannelSet
|  | channelDisconnect | Dispatched after a Channel in the ChannelSet has disconnected from its endpoint. | ChannelSet
|  | channelFault | Dispatched after a Channel in the ChannelSet has faulted. | ChannelSet
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher
|  | fault | The fault event is dispatched when a login or logout call fails. | ChannelSet
|  | propertyChange | Dispatched when a property of the ChannelSet changes. | ChannelSet
|  | result | The result event is dispatched when a login or logout call successfully returns. | ChannelSet

Public Constants

| Constant | Defined By
--- | --- | ---
|  | MAX_REPLY_FETCH_INTERVAL_MILLIS : int = 30000 [static] Constant value for the upper limit for fetch interval. | AdvancedChannelSet
|  | START : String = "start" [static] Special header value to instruct a client to start measuring it's rate. | AdvancedChannelSet
|  | STOP : String = "stop" [static] Special header value to instruct a client to stop measuring it's rate. | AdvancedChannelSet

Protected Constants

| Constant | Defined By
--- | --- | ---
|  | ADAPTIVE_FREQUENCY_DESTINATION : String = "_DSAF" [static] Special value of a destination using adaptive frequency. | AdvancedChannelSet

Property Detail

### reliableReconnectDuration

property

`public var reliableReconnectDuration:int`

The duration in milliseconds that channels within the AdvancedChannelSet will attempt to reconnect in a reliable fashion to the remote endpoint they where previous connected to, before advancing to the normal automatic failover and protocol fallback algorithm. The default value, 0, triggers a single reliable reconnect attempt. Assigned values must be 0 or greater and for any value larger than 0, in the event of a network disconnect, attempts will be made to re-establish the pre-existing reliable connection for the specified time duration in milliseconds.

Throws

| `RangeError` — If a negative value is assigned.

Constructor Detail

### AdvancedChannelSet

()
Constructor

`public function AdvancedChannelSet(channelIds:Array = null, clusteredWithURLLoadBalancing:Boolean = false)`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructs an AdvancedChannelSet. If the `channelIds` argument is provided, the AdvancedChannelSet will use automatically configured Channels obtained via `ServerConfig.getChannel()` to reach a destination. Attempting to manually assign Channels to an AdvancedChannelSet that uses configured Channels is not allowed.

If the `channelIds` argument is not provided or is null, Channels must be manually created and added to the AdvancedChannelSet in order to connect and send messages.

If the AdvancedChannelSet is clustered using url-load-balancing (where each server declares a unique RTMP or HTTP URL and the client fails over from one URL to the next), the first time that a Channel in the ChannelSet successfully connects the AdvancedChannelSet will automatically make a request for all of the endpoints across the cluster for all member Channels and will assign these failover URLs to each respective Channel. This allows Channels in the ChannelSet to failover individually, and when failover options for a specific Channel are exhausted the AdvancedChannelSet will advance to the next Channel in the set to attempt to reconnect.

Regardless of clustering, if a Channel cannot connect or looses connectivity, the AdvancedChannelSet will advance to its next available Channel and attempt to reconnect. This allows the AdvancedChannelSet to hunt through Channels that use different protocols, ports, etc., in search of one that can connect to its endpoint successfully.

Parameters

| `channelIds:Array` (default = `null`)`` — The ids of configured Channels obtained from ServerConfig for this AdvancedChannelSet to use. If null, Channels must be manually added to the AdvancedChannelSet.
| `clusteredWithURLLoadBalancing:Boolean` (default = `false`)`` — True if the Channels in the AdvancedChannelSet are clustered using url load balancing.

Constant Detail

### ADAPTIVE_FREQUENCY_DESTINATION

Constant

`protected static const ADAPTIVE_FREQUENCY_DESTINATION:String = "_DSAF"`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Special value of a destination using adaptive frequency.

### MAX_REPLY_FETCH_INTERVAL_MILLIS

Constant

`public static const MAX_REPLY_FETCH_INTERVAL_MILLIS:int = 30000`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constant value for the upper limit for fetch interval.

### START

Constant

`public static const START:String = "start"`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Special header value to instruct a client to start measuring it's rate.

### STOP

Constant

`public static const STOP:String = "stop"`

Language Version: | ActionScript 3.0

Product Version: | Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Special header value to instruct a client to stop measuring it's rate.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00