Adobe DPS - Reading SDK 2.32

Class adobeDPS-SignalBinding

Author:
Miller Medeiros
Platforms:
iOS, Android, Windows

Constructor

adobeDPS-SignalBinding(signal:adobeDPS-Signal, listener:Function, isOnce:boolean, listenerContext:Object, priority:Number)
[inner] Object that represents a binding between a Signal and a listener function.

Fields

Field Defined By
context : Object|undefined|null
Context on which listener will be executed (object that should represent the this variable inside listener function).
SignalBinding
active : Boolean
If binding is active and should be executed.
SignalBinding
params : Array|null
Default parameters passed to listener during Signal.dispatch and SignalBinding.execute.
SignalBinding

Methods

Method Defined By
execute(paramsArr:Array)
Call listener passing arbitrary parameters.
SignalBinding
detach()
Detach binding from signal.
SignalBinding
SignalBinding
SignalBinding
isOnce()
SignalBinding
SignalBinding
Class Detail
adobeDPS-SignalBinding(signal:adobeDPS-Signal, listener:Function, isOnce:boolean, listenerContext:Object, priority:Number)
[inner] Object that represents a binding between a Signal and a listener function.
- This is an internal constructor and shouldn't be called by regular users.
- inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.
Parameters
signal adobeDPS-Signal Reference to Signal object that listener is currently bound to.
listener Function Handler function bound to the signal.
isOnce boolean If binding should be executed just once.
listenerContext Object Context on which listener will be executed (object that should represent the this variable inside listener function).
priority Number The priority level of the event listener. (default = 0).
Field Details
context : Object|undefined|null
Context on which listener will be executed (object that should represent the this variable inside listener function).
Platforms:
iOS, Android, Windows
active : Boolean
If binding is active and should be executed.
Platforms:
iOS, Android, Windows
params : Array|null
Default parameters passed to listener during Signal.dispatch and SignalBinding.execute. (curried parameters)
Platforms:
iOS, Android, Windows
Method Details
execute(paramsArr:Array) : *
Call listener passing arbitrary parameters.

If binding was added using Signal.addOnce() it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.

Parameters
paramsArr Array Array of parameters that should be passed to the listener
Returns:
* Value returned by the listener.
Platforms:
iOS, Android, Windows
detach() : Function|null
Detach binding from signal. - alias to: mySignal.remove(myBinding.getListener());
Returns:
Function|null Handler function bound to the signal or null if binding was previously detached.
Platforms:
iOS, Android, Windows
isBound() : Boolean
Returns:
Boolean true if binding is still bound to the signal and have a listener.
Platforms:
iOS, Android, Windows
getListener() : Function
Returns:
Function Handler function bound to the signal.
Platforms:
iOS, Android, Windows
isOnce() : Boolean
Returns:
Boolean If SignalBinding will only be executed once.
Platforms:
iOS, Android, Windows
toString() : String
Returns:
String String representation of the object.
Platforms:
iOS, Android, Windows
©2012-2013 Adobe Systems, inc
Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 31 2015 09:23:40 GMT-0700 (PDT)