Packageorg.springextensions.actionscript.core.event
SVN browsingEventBusFacade.as
FisheyeEventBusFacade.as
Classpublic class EventBusFacade
ImplementsIEventBus

Basic implementation of the IEventBus interface that acts as a facade for the static EventBus class. Every method is re-rerouted to the static equivalent in the EventBus class.

Implemented to make mocking the EventBus a little easier.

See also

EventBus


Documentation reference: the eventbus introduction


Public Methods
 MethodDefined by
  
Creates a new EventBusFacade instance.
EventBusFacade
  
addEventClassListener(eventClass:Class, listener:Function, useWeakReference:Boolean = false):void
Adds a listener function for events of a specific Class.
EventBusFacade
  
addEventClassListenerProxy(eventClass:Class, proxy:MethodInvoker, useWeakReference:Boolean = false):void
Adds a proxied event handler as a listener for events of a specific Class.
EventBusFacade
  
addEventListener(type:String, listener:Function, useWeakReference:Boolean = false):void
Adds the given listener function as an event handler to the given event type.
EventBusFacade
  
addEventListenerProxy(type:String, proxy:MethodInvoker, useWeakReference:Boolean = false):void
Adds a proxied event handler as a listener to the specified event type.
EventBusFacade
  
addListener(listener:IEventBusListener, useWeakReference:Boolean = false):void
Adds the given listener object as a listener to all events send via the event bus.
EventBusFacade
  
dispatch(type:String):void
Convenience method for dispatching an event.
EventBusFacade
  
dispatchEvent(event:Event):void
Dispatches the specified Event on the event bus.
EventBusFacade
  
removeAll():void
Clears the entire IEventBus by removing all types of listeners.
EventBusFacade
  
removeEventClassListener(eventClass:Class, listener:Function):void
Removes a listener function for events of a specific Class.
EventBusFacade
  
removeEventClassListenerProxy(eventClass:Class, proxy:MethodInvoker):void
Removes a proxied event handler as a listener for events of a specific Class.
EventBusFacade
  
removeEventListener(type:String, listener:Function):void
Removes the given listener function as an event handler from the given event type.
EventBusFacade
  
removeEventListenerProxy(type:String, proxy:MethodInvoker):void
Removes a proxied event handler as a listener from the specified event type.
EventBusFacade
  
Removes the given listener from the event bus.
EventBusFacade
Constructor detail
EventBusFacade()constructor
public function EventBusFacade()

Creates a new EventBusFacade instance.

Method detail
addEventClassListener()method
public function addEventClassListener(eventClass:Class, listener:Function, useWeakReference:Boolean = false):void

Adds a listener function for events of a specific Class.

Parameters
eventClass:Class — The specified Class.
 
listener:Function — The specified listener function.
 
useWeakReference:Boolean (default = false)

See also

EventBus.addEventClassListener()
addEventClassListenerProxy()method 
public function addEventClassListenerProxy(eventClass:Class, proxy:MethodInvoker, useWeakReference:Boolean = false):void

Adds a proxied event handler as a listener for events of a specific Class.

Parameters
eventClass:Class — The specified Class.
 
proxy:MethodInvoker — The specified listener function.
 
useWeakReference:Boolean (default = false)

See also

EventBus.addEventClassListenerProxy()
addEventListener()method 
public function addEventListener(type:String, listener:Function, useWeakReference:Boolean = false):void

Adds the given listener function as an event handler to the given event type.

Parameters
type:String — the type of event to listen to
 
listener:Function — the event handler function
 
useWeakReference:Boolean (default = false)

See also

EventBus.addEventListener()
addEventListenerProxy()method 
public function addEventListenerProxy(type:String, proxy:MethodInvoker, useWeakReference:Boolean = false):void

Adds a proxied event handler as a listener to the specified event type.

Parameters
type:String — the type of event to listen to
 
proxy:MethodInvoker — a proxy method invoker for the event handler
 
useWeakReference:Boolean (default = false)

See also

EventBus.addEventListenerProxy()
addListener()method 
public function addListener(listener:IEventBusListener, useWeakReference:Boolean = false):void

Adds the given listener object as a listener to all events send via the event bus.

Parameters
listener:IEventBusListener
 
useWeakReference:Boolean (default = false)

See also

EventBus.addListener()
dispatch()method 
public function dispatch(type:String):void

Convenience method for dispatching an event. This will create an Event instance with the given type and call dispatchEvent() on the event bus.

Parameters
type:String — the type of the event to dispatch

See also

EventBus.dispatch()
dispatchEvent()method 
public function dispatchEvent(event:Event):void

Dispatches the specified Event on the event bus.

Parameters
event:Event — The specified Event.

See also

EventBus.dispatchEvent()
removeAll()method 
public function removeAll():void

Clears the entire IEventBus by removing all types of listeners.

See also

EventBus.removeAll()
removeEventClassListener()method 
public function removeEventClassListener(eventClass:Class, listener:Function):void

Removes a listener function for events of a specific Class.

Parameters
eventClass:Class — The specified Class.
 
listener:Function — The specified listener function.

See also

EventBus.removeEventClassListener()
removeEventClassListenerProxy()method 
public function removeEventClassListenerProxy(eventClass:Class, proxy:MethodInvoker):void

Removes a proxied event handler as a listener for events of a specific Class.

Parameters
eventClass:Class — The specified Class.
 
proxy:MethodInvoker — The specified listener function.

See also

EventBus.removeEventClassListenerProxy()
removeEventListener()method 
public function removeEventListener(type:String, listener:Function):void

Removes the given listener function as an event handler from the given event type.

Parameters
type:String
 
listener:Function

See also

EventBus.removeEventListener()
removeEventListenerProxy()method 
public function removeEventListenerProxy(type:String, proxy:MethodInvoker):void

Removes a proxied event handler as a listener from the specified event type.

Parameters
type:String
 
proxy:MethodInvoker

See also

EventBus.removeEventListenerProxy()
removeListener()method 
public function removeListener(listener:IEventBusListener):void

Removes the given listener from the event bus.

Parameters
listener:IEventBusListener

See also

EventBus.removeListener()