mx.messaging.channels

# StreamingAMFChannel - AS3 BlazeDS LCDS

Package | mx.messaging.channels
Class | public class StreamingAMFChannel
Inheritance | StreamingAMFChannel AMFChannel NetConnectionChannel PollingChannel Channel EventDispatcher Object
Subclasses | SecureStreamingAMFChannel

Language Version: | ActionScript 3.0

Product Versions: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

The StreamingAMFChannel class provides support for messaging and offers a different push model than the base AMFChannel. Rather than polling for data from the server, the streaming channel opens an internal HTTP connection to the server that is held open to allow the server to stream data down to the client with no poll overhead.

Messages sent by this channel to the server are sent using a NetConnection which uses an HTTP connection internally for the duration of the operation. Once the message is sent and an acknowledgement or fault is returned the HTTP connection used by NetConnection is released by the channel. These client-to-server messages are not sent over the streaming HTTP connection that the channel holds open to receive server pushed data.

Although this class extends the base AMFChannel to inherit the regular AMF handling, it does not support polling.

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | authenticated : Boolean [read-only] Indicates if this channel is authenticated. | Channel
|  | channelSets : Array [read-only] Provides access to the ChannelSets connected to the Channel. | Channel
|  | connected : Boolean [read-only] Indicates whether this channel has established a connection to the remote destination. | Channel
|  | connectTimeout : int Provides access to the connect timeout in seconds for the channel. | Channel
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | endpoint : String [read-only] Provides access to the endpoint for this channel. | Channel
|  | failoverURIs : Array Provides access to the set of endpoint URIs that this channel can attempt to failover to if the endpoint is clustered. | Channel
|  | id : String Provides access to the id of this channel. | Channel
|  | netConnection : NetConnection [read-only] Provides access to the associated NetConnection for this Channel. | NetConnectionChannel
|  | piggybackingEnabled : Boolean Indicates whether this channel will piggyback poll requests along with regular outbound messages when an outstanding poll is not in progress. | AMFChannel
|  | polling : Boolean [read-only] Reports whether the channel is actively polling. | AMFChannel
|  | pollingEnabled : Boolean Indicates whether this channel is enabled to poll. | AMFChannel
|  | pollingInterval : Number Provides access to the polling interval for this Channel. | AMFChannel
|  | protocol : String [override] [read-only] Returns the protocol for this channel (http). | AMFChannel
|  | reconnecting : Boolean [read-only] Indicates whether this channel is in the process of reconnecting to an alternate endpoint. | Channel
|  | recordMessageSizes : Boolean [read-only] Channel property determines the level of performance information injection - whether we inject message sizes or not. | Channel
|  | recordMessageTimes : Boolean [read-only] Channel property determines the level of performance information injection - whether we inject timestamps or not. | Channel
|  | requestTimeout : int Provides access to the default request timeout in seconds for the channel. | Channel
|  | uri : String Provides access to the URI used to create the whole endpoint URI for this channel. | Channel

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined By
--- | --- | ---
|  | shouldBeConnected : Boolean [read-only] Indicates whether this channel should be connected to its endpoint. | Channel

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | StreamingAMFChannel(id:String = null, uri:String = null) Constructor. | StreamingAMFChannel
|  | 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
|  | applySettings(settings:XML):void Subclasses should override this method to apply any settings that may be necessary for an individual channel. | Channel
|  | connect(channelSet:ChannelSet):void Connects the ChannelSet to the Channel. | Channel
|  | disablePolling():void Disables polling based on the number of times enablePolling() and disablePolling() have been invoked. | PollingChannel
|  | disconnect(channelSet:ChannelSet):void Disconnects the ChannelSet from the Channel. | Channel
|  | dispatchEvent(event:Event):Boolean Dispatches an event into the event flow. | EventDispatcher
|  | enablePolling():void Enables polling based on the number of times enablePolling() and disablePolling() have been invoked. | PollingChannel
|  | 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
|  | logout(agent:MessageAgent):void Sends a CommandMessage to the server to logout if the Channel is connected. | Channel
|  | poll():void [override] Polling is not supported by this channel. | StreamingAMFChannel
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void Removes a listener from the EventDispatcher object. | EventDispatcher
|  | send(agent:MessageAgent, message:IMessage):void [override] Sends the specified message to its target destination. | PollingChannel
|  | setCredentials(credentials:String, agent:MessageAgent = null, charset:String = null):void Sets the credentials to the specified value. | Channel
|  | 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 Returns the string representation of the specified object. | Object
|  | 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
--- | --- | ---
|  | applyClientLoadBalancingSettings(props:XML):void Applies the client load balancing urls if they exists. | Channel
|  | connectFailed(event:ChannelFaultEvent):void Processes a failed internal connect and dispatches the FAULT event for the channel. | Channel
|  | connectSuccess():void Processes a successful internal connect and dispatches the CONNECT event for the Channel. | Channel
|  | connectTimeoutHandler(event:flash.events:TimerEvent):void Handles a connect timeout by dispatching a ChannelFaultEvent. | Channel
|  | disconnectFailed(event:ChannelFaultEvent):void Processes a failed internal disconnect and dispatches the FAULT event for the channel. | Channel
|  | disconnectSuccess(rejected:Boolean = false):void Processes a successful internal disconnect and dispatches the DISCONNECT event for the Channel. | Channel
|  | flexClientWaitHandler(event:PropertyChangeEvent):void Handles a change to the guard condition for managing initial Channel connect for the application. | Channel
|  | getMessageResponder(agent:MessageAgent, message:IMessage):MessageResponder Returns the appropriate MessageResponder for the Channel's send() method. | Channel
|  | internalConnect():void Connects the Channel to its endpoint. | Channel
|  | internalDisconnect(rejected:Boolean = false):void Disconnects the Channel from its endpoint. | Channel
|  | internalSend(messageResponder:MessageResponder):void Sends the Message out over the Channel and routes the response to the responder. | Channel

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 the channel has connected to its endpoint. | Channel
|  | channelDisconnect | Dispatched after the channel has disconnected from its endpoint. | Channel
|  | channelFault | Dispatched after the channel has faulted. | Channel
|  | deactivate | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher
|  | message | Dispatched when a channel receives a message from its endpoint. | Channel
|  | propertyChange | Dispatched when a property of the channel changes. | Channel

Protected Constants
Hide Inherited Protected Constants
Show Inherited Protected Constants

| Constant | Defined By
--- | --- | ---

Constructor Detail

### StreamingAMFChannel

()
Constructor

`public function StreamingAMFChannel(id:String = null, uri:String = null)`

Language Version: | ActionScript 3.0

Product Versions: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructor.

Parameters

| `id:String` (default = `null`)`` — The id of this Channel.
| `uri:String` (default = `null`)`` — The uri for this Channel.

Method Detail

### poll

()
method

`override public function poll():void`

Language Version: | ActionScript 3.0

Product Versions: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3

Runtime Versions: | Flash Player 9, AIR 1.1

Polling is not supported by this channel.

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