ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
mx.messaging.channels 

RTMPChannel  - AS3 ADEP Data Services

Packagemx.messaging.channels
Classpublic class RTMPChannel
InheritanceRTMPChannel Inheritance NetConnectionChannel Inheritance PollingChannel Inheritance Channel Inheritance EventDispatcher Inheritance Object
Subclasses SecureRTMPChannel

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

The RTMPChannel class provides basic RTMP support for messaging.

The RTMPChannel relies on network services native to Flash Player, and exposed to ActionScript by the NetConnection class. This Channel uses NetConnection exclusively.

Channels are created within the framework using the ServerConfig.getChannel() method. Channels can be constructed directly and assigned to a ChannelSet if desired.

Channels represent a physical connection to a remote endpoint. Channels are shared across destinations by default. This means that a client targetting different destinations may use the same Channel to communicate with these destinations.



Public Properties
 PropertyDefined By
 Inheritedauthenticated : Boolean
[read-only] Indicates if this channel is authenticated.
Channel
 InheritedchannelSets : Array
[read-only] Provides access to the ChannelSets connected to the Channel.
Channel
 Inheritedconnected : Boolean
[read-only] Indicates whether this channel has established a connection to the remote destination.
Channel
 InheritedconnectTimeout : int
Provides access to the connect timeout in seconds for the channel.
Channel
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedendpoint : String
[read-only] Provides access to the endpoint for this channel.
Channel
 InheritedfailoverURIs : Array
Provides access to the set of endpoint URIs that this channel can attempt to failover to if the endpoint is clustered.
Channel
 Inheritedid : String
Provides access to the id of this channel.
Channel
 InheritednetConnection : NetConnection
[read-only] Provides access to the associated NetConnection for this Channel.
NetConnectionChannel
  protocol : String
[override] [read-only] Returns the protocol for this channel (rtmp or rtmpt).
RTMPChannel
 Inheritedreconnecting : Boolean
[read-only] Indicates whether this channel is in the process of reconnecting to an alternate endpoint.
Channel
 InheritedrecordMessageSizes : Boolean
[read-only] Channel property determines the level of performance information injection - whether we inject message sizes or not.
Channel
 InheritedrecordMessageTimes : Boolean
[read-only] Channel property determines the level of performance information injection - whether we inject timestamps or not.
Channel
 InheritedrequestTimeout : int
Provides access to the default request timeout in seconds for the channel.
Channel
 Inheriteduri : String
Provides access to the URI used to create the whole endpoint URI for this channel.
Channel
Protected Properties
 PropertyDefined By
 InheritedshouldBeConnected : Boolean
[read-only] Indicates whether this channel should be connected to its endpoint.
Channel
Public Methods
 MethodDefined By
  
RTMPChannel(id:String = null, uri:String = null)
Creates an new RTMPChannel instance.
RTMPChannel
 Inherited
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
 Inherited
Subclasses should override this method to apply any settings that may be necessary for an individual channel.
Channel
 Inherited
connect(channelSet:ChannelSet):void
Connects the ChannelSet to the Channel.
Channel
 Inherited
Disables polling based on the number of times enablePolling() and disablePolling() have been invoked.
PollingChannel
 Inherited
Disconnects the ChannelSet from the Channel.
Channel
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Enables polling based on the number of times enablePolling() and disablePolling() have been invoked.
PollingChannel
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Sends a CommandMessage to the server to logout if the Channel is connected.
Channel
  
[override] Do nothing if the client requests that we poll.
RTMPChannel
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
send(agent:MessageAgent, message:IMessage):void
[override] Sends the specified message to its target destination.
PollingChannel
 Inherited
setCredentials(credentials:String, agent:MessageAgent = null, charset:String = null):void
Sets the credentials to the specified value.
Channel
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Protected Methods
 MethodDefined By
 Inherited
Applies the client load balancing urls if they exists.
Channel
 Inherited
Processes a failed internal connect and dispatches the FAULT event for the channel.
Channel
 Inherited
Processes a successful internal connect and dispatches the CONNECT event for the Channel.
Channel
 Inherited
Handles a connect timeout by dispatching a ChannelFaultEvent.
Channel
 Inherited
Processes a failed internal disconnect and dispatches the FAULT event for the channel.
Channel
 Inherited
disconnectSuccess(rejected:Boolean = false):void
Processes a successful internal disconnect and dispatches the DISCONNECT event for the Channel.
Channel
 Inherited
Handles a change to the guard condition for managing initial Channel connect for the application.
Channel
 Inherited
Returns the appropriate MessageResponder for the Channel's send() method.
Channel
 Inherited
Connects the Channel to its endpoint.
Channel
 Inherited
internalDisconnect(rejected:Boolean = false):void
Disconnects the Channel from its endpoint.
Channel
 Inherited
Sends the Message out over the Channel and routes the response to the responder.
Channel
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 InheritedDispatched after the channel has connected to its endpoint.Channel
 InheritedDispatched after the channel has disconnected from its endpoint.Channel
 InheritedDispatched after the channel has faulted.Channel
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
 InheritedDispatched when a channel receives a message from its endpoint.Channel
 InheritedDispatched when a property of the channel changes.Channel
Protected Constants
 ConstantDefined By
  CODE_CONNECT_CLOSED : String = "Connect.Closed"
[static] Status code for connection closed.
RTMPChannel
  CODE_CONNECT_FAILED : String = "Connect.Failed"
[static] Status code for connection failed.
RTMPChannel
  CODE_CONNECT_NETWORKCHANGE : String = "Connect.NetworkChange"
[static] Status code for connection network change.
RTMPChannel
  CODE_CONNECT_REJECTED : String = "Connect.Rejected"
[static] Status code for connection rejected.
RTMPChannel
  CODE_CONNECT_SUCCESS : String = "Connect.Success"
[static] Status code for connection success.
RTMPChannel
Property Detail

protocol

property
protocol:String  [read-only] [override]

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

Returns the protocol for this channel (rtmp or rtmpt).



Implementation
    override public function get protocol():String
Constructor Detail

RTMPChannel

()Constructor
public function RTMPChannel(id:String = null, uri:String = null)

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

Creates an new RTMPChannel instance.

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 Version: Adobe Digital Enterprise Platform Data Services for Java EE 3
Runtime Versions: Flash Player 9, AIR 1.1

Do nothing if the client requests that we poll.

Constant Detail

CODE_CONNECT_CLOSED

Constant
protected static const CODE_CONNECT_CLOSED:String = "Connect.Closed"

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

Status code for connection closed.

CODE_CONNECT_FAILED

Constant 
protected static const CODE_CONNECT_FAILED:String = "Connect.Failed"

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

Status code for connection failed.

CODE_CONNECT_NETWORKCHANGE

Constant 
protected static const CODE_CONNECT_NETWORKCHANGE:String = "Connect.NetworkChange"

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

Status code for connection network change.

CODE_CONNECT_REJECTED

Constant 
protected static const CODE_CONNECT_REJECTED:String = "Connect.Rejected"

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

Status code for connection rejected.

CODE_CONNECT_SUCCESS

Constant 
protected static const CODE_CONNECT_SUCCESS:String = "Connect.Success"

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

Status code for connection success.