new UWA.Dispatcher.Binding()
Custom event/messaging Object for UWA.Dispatcher
Index
Members
Methods
Members
-
listener :Function
-
Handler function bound to the dispatcher.
Type
- Function
-
isOnce :Boolean
-
If binding should be executed just once.
Type
- Boolean
-
context :Void
-
Context on which listener will be executed (object that should represent the
this
variable inside listener function).Type
- Void
-
dispatcher :Class
-
Reference to UWA.Dispatcher instance that listener is currently bound to.
Type
- Class
-
priority :Number
-
Listener priority.
Type
- Number
-
active :Boolean
-
If binding is active and should be executed.
Type
- Boolean
Methods
-
execute(params)
-
Call listener passing arbitrary parameters.
If binding was added using "myDispatcher.addOnce()" it will be automatically removed from dispatcher dispatch queue, this method is used internally for the dispatcher dispatch.
Parameters
Name Type Description params
Array Array of parameters that should be passed to the listener
Returns
Value returned by the listener.
-
detach() → {Function}
-
Detach binding from dispatcher.
Returns
Handler function bound to the dispatcher.
- Type
- Function
-
getListener() → {Function}
-
Get handler function bound to the dispatcher.
Returns
Handler function bound to the dispatcher.
- Type
- Function
-
dispose()
-
Remove binding from dispatcher and destroy any reference to external Objects.
Calling methods on the binding instance after calling dispose will throw errors.
-
destroy()
-
Delete all instance properties.
-
toString() → {String}
-
Get String representation of the object.
Internal or advanced use only.
Returns
String representation of the object.
- Type
- String