class ChannelEvent
package feathers.messaging.events
extends Event
extended by ChannelFaultEvent
The ChannelEvent is used to propagate channel events within the messaging system.
Static variables
staticfinalread onlyCONNECT:String = "channelConnect"
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:
Property | Value |
---|---|
`bubbles` | false |
`cancelable` | false |
`channel` | The channel that generated this event. |
`currentTarget` | The 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`. |
`target` | The 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. |
staticfinalread onlyDISCONNECT:String = "channelDisconnect"
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:
Property | Value |
---|---|
`bubbles` | false |
`cancelable` | false |
`channel` | The channel that generated this event. |
`currentTarget` | The 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`. |
`target` | The 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. |
Static methods
staticcreateEvent(type:String, ?channel:Channel, reconnecting:Bool = false, rejected:Bool = false, connected:Bool = false):ChannelEvent
Utility method to create a new ChannelEvent that doesn't bubble and is not cancelable.
Parameters:
type | The ChannelEvent type. |
---|---|
channel | The Channel generating the event. |
reconnecting | Indicates whether the Channel is in the process of reconnecting or not. |
rejected | Indicates whether the Channel's connection has been rejected, which suppresses automatic reconnection. |
connected | Indicates whether the Channel that generated this event is already connected. |
Returns:
New ChannelEvent.
Constructor
new(type:String, bubbles:Bool = false, cancelable:Bool = false, ?channel:Channel, reconnecting:Bool = false, rejected:Bool = false, connected:Bool = false)
Constructs an instance of this event with the specified type and Channel instance.
Parameters:
type | The ChannelEvent type. |
---|---|
bubbles | Specifies whether the event can bubble up the display list hierarchy. |
cancelable | Indicates whether the behavior associated with the event can be prevented; used by the RPC subclasses. |
channel | The Channel generating the event. |
reconnecting | Indicates whether the Channel is in the process of reconnecting or not. |
rejected | Indicates whether the Channel's connection has been rejected, which suppresses automatic reconnection. |
connected | Indicates whether the Channel that generated this event is already connected. |
Variables
rejected:Bool
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.