| Package | system.broadcasters |
| Class | public class InternalBroadcaster |
| Inheritance | InternalBroadcaster Object |
| Implements | Broadcaster |
| Subclasses | FastDispatcher, MessageBroadcaster |
| Property | Defined By | ||
|---|---|---|---|
| length : uint [read-only]
Indicates the number of listeners registered in the Broadcaster. | InternalBroadcaster | ||
| Property | Defined By | ||
|---|---|---|---|
| listeners : Vector.<BroadcasterEntry>
The Vector representation of all listeners. | InternalBroadcaster | ||
| Method | Defined By | ||
|---|---|---|---|
InternalBroadcaster(listeners:Array = null)
Creates a new InternalBroadcaster instance. | InternalBroadcaster | ||
addListener(listener:*, priority:uint = 0, autoRemove:Boolean = false):Boolean
Registers an object to receive messages. | InternalBroadcaster | ||
broadcastMessage(message:String, ... rest):*
Broadcast the specified message. | InternalBroadcaster | ||
hasListener(listener:*):Boolean
Returns true if this dispatcher contains the specified listener. | InternalBroadcaster | ||
isEmpty():Boolean
Returns true if the set of listeners is empty. | InternalBroadcaster | ||
removeListener(listener:* = null):Boolean
Removes the specified listener or all listeners if the parameter is null. | InternalBroadcaster | ||
toArray():Array
Returns the Array representation of all listeners. | InternalBroadcaster | ||
| length | property |
length:uint [read-only] Indicates the number of listeners registered in the Broadcaster.
public function get length():uint| listeners | property |
protected var listeners:Vector.<BroadcasterEntry>The Vector representation of all listeners.
| InternalBroadcaster | () | Constructor |
public function InternalBroadcaster(listeners:Array = null)Creates a new InternalBroadcaster instance.
Parameterslisteners:Array (default = null) — The Array collection of listeners to initialize in the broadcaster.
|
| addListener | () | method |
public function addListener(listener:*, priority:uint = 0, autoRemove:Boolean = false):BooleanRegisters an object to receive messages.
Parameters
listener:* — The listener to register.
| |
priority:uint (default = 0) — Determinates the priority level of the listener.
| |
autoRemove:Boolean (default = false) — Apply a removeListener after the first trigger
|
Boolean — true If the listener is register in the broadcaster.
|
| broadcastMessage | () | method |
public function broadcastMessage(message:String, ... rest):*Broadcast the specified message.
Parameters
message:String — The message to broadcast.
| |
... rest — Optional parameters passed in with the broadcast message.
|
* |
| hasListener | () | method |
public function hasListener(listener:*):Boolean
Returns true if this dispatcher contains the specified listener.
Parameters
listener:* |
Boolean — true if this dispatcher contains the specified listener.
|
| isEmpty | () | method |
public function isEmpty():Boolean
Returns true if the set of listeners is empty.
Boolean — true if the set of listeners is empty.
|
| removeListener | () | method |
public function removeListener(listener:* = null):BooleanRemoves the specified listener or all listeners if the parameter is null.
Parameters
listener:* (default = null) |
Boolean — true if the specified listener exist and can be removed.
|
| toArray | () | method |
public function toArray():ArrayReturns the Array representation of all listeners.
ReturnsArray — the Array representation of all listeners.
|