Packagemx.messaging.events
Classpublic class ChannelEvent
InheritanceChannelEvent Inheritance flash.events.Event
Subclasses ChannelFaultEvent

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

The ChannelEvent is used to propagate channel events within the messaging system.



Public Properties
 PropertyDefined By
  channel : Channel
The Channel that generated this event.
ChannelEvent
  connected : Boolean
Indicates whether the Channel that generated this event is already connected.
ChannelEvent
  reconnecting : Boolean
Indicates whether the Channel that generated this event is reconnecting.
ChannelEvent
  rejected : Boolean
Indicates whether the Channel that generated this event was rejected.
ChannelEvent
Public Methods
 MethodDefined By
  
ChannelEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, channel:Channel = null, reconnecting:Boolean = false, rejected:Boolean = false, connected:Boolean = false)
Constructs an instance of this event with the specified type and Channel instance.
ChannelEvent
  
clone():Event
[override] Clones the ChannelEvent.
ChannelEvent
  
createEvent(type:String, channel:Channel = null, reconnecting:Boolean = false, rejected:Boolean = false, connected:Boolean = false):ChannelEvent
[static] Utility method to create a new ChannelEvent that doesn't bubble and is not cancelable.
ChannelEvent
  
toString():String
[override] Returns a string representation of the ChannelEvent.
ChannelEvent
Public Constants
 ConstantDefined By
  CONNECT : String = channelConnect
[static] The CONNECT event type; indicates that the Channel connected to its endpoint.
ChannelEvent
  DISCONNECT : String = channelDisconnect
[static] The DISCONNECT event type; indicates that the Channel disconnected from its endpoint.
ChannelEvent
Property Detail
channelproperty
public var channel:Channel

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

The Channel that generated this event.

connectedproperty 
public var connected:Boolean

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Indicates whether the Channel that generated this event is already connected.

reconnectingproperty 
public var reconnecting:Boolean

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Indicates whether the Channel that generated this event is reconnecting.

rejectedproperty 
public var rejected:Boolean

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Indicates whether the Channel that generated this event was rejected. This would be true in the event that the channel has been disconnected due to inactivity and should not attempt to failover or connect on an alternate channel.

Constructor Detail
ChannelEvent()Constructor
public function ChannelEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, channel:Channel = null, reconnecting:Boolean = false, rejected:Boolean = false, connected:Boolean = false)

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Constructs an instance of this event with the specified type and Channel instance.

Parameters
type:String — The ChannelEvent type.
 
bubbles:Boolean (default = false) — Specifies whether the event can bubble up the display list hierarchy.
 
cancelable:Boolean (default = false) — Indicates whether the behavior associated with the event can be prevented; used by the RPC subclasses.
 
channel:Channel (default = null) — The Channel generating the event.
 
reconnecting:Boolean (default = false) — Indicates whether the Channel is in the process of reconnecting or not.
 
rejected:Boolean (default = false) — Indicates whether the Channel's connection has been rejected, which suppresses automatic reconnection.
 
connected:Boolean (default = false) — Indicates whether the Channel that generated this event is already connected.
Method Detail
clone()method
override public function clone():Event

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Clones the ChannelEvent.

Returns
Event — Copy of this ChannelEvent.
createEvent()method 
public static function createEvent(type:String, channel:Channel = null, reconnecting:Boolean = false, rejected:Boolean = false, connected:Boolean = false):ChannelEvent

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Utility method to create a new ChannelEvent that doesn't bubble and is not cancelable.

Parameters

type:String — The ChannelEvent type.
 
channel:Channel (default = null) — The Channel generating the event.
 
reconnecting:Boolean (default = false) — Indicates whether the Channel is in the process of reconnecting or not.
 
rejected:Boolean (default = false) — Indicates whether the Channel's connection has been rejected, which suppresses automatic reconnection.
 
connected:Boolean (default = false) — Indicates whether the Channel that generated this event is already connected.

Returns
ChannelEvent — New ChannelEvent.
toString()method 
override public function toString():String

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

Returns a string representation of the ChannelEvent.

Returns
String — String representation of the ChannelEvent.
Constant Detail
CONNECTConstant
public static const CONNECT:String = channelConnect

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

The CONNECT event type; indicates that the Channel connected to its endpoint.

The value of this constant is "channelConnect".

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
channelThe channel that generated this event.
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
reconnecting Indicates whether the channel that generated this event is reconnecting.
rejected Indicates whether the channel that generated this event was rejected. This would be true in the event that the channel has been disconnected due to inactivity and should not attempt to failover or connect on an alternate channel.

DISCONNECTConstant 
public static const DISCONNECT:String = channelDisconnect

Language Version : ActionScript 3.0
Product Versions : BlazeDS 4, LCDS 3
Runtime Versions : Flash Player 9, AIR 1.1

The DISCONNECT event type; indicates that the Channel disconnected from its endpoint.

The value of this constant is "channelDisconnect".

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
channelThe channel that generated this event.
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
reconnecting Indicates whether the channel that generated this event is reconnecting.
rejected Indicates whether the channel that generated this event was rejected. This would be true in the event that the channel has been disconnected due to inactivity and should not attempt to failover or connect on an alternate channel.