Adobe DPS - JavaScript Library API

Class adobeDPS-SignalBinding

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).
active : Boolean
If binding is active and should be executed.
params : Array|null
Default parameters passed to listener during Signal.dispatch and SignalBinding.execute. (curried parameters)
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.
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.
isBound() : Boolean
Returns:
Boolean true if binding is still bound to the signal and have a listener.
getListener() : Function
Returns:
Function Handler function bound to the signal.
isOnce() : Boolean
Returns:
Boolean If SignalBinding will only be executed once.
toString() : String
Returns:
String String representation of the object.
©2012 Adobe Systems, inc
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 01 2012 12:15:47 GMT-0700 (PDT)