|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxdc.services.getset.Fxn
public class Fxn
A scheduled function in a Group. Each Fxn must be idempotent. That is, if the Fxn has just been run then running it again immediately should have no additional effect; i.e., Fxn f is idempotent iff running "f(); f()" is always equivalent to running just "f()". Examples of such functions are those that just copy a value from one location to another without changing it, or only changing its data representation.
Constructor Summary | |
---|---|
Fxn(Group group,
org.mozilla.javascript.Callable body)
Create a new Fxn that will execute the given body, as scheduled by the given Group. |
Method Summary | |
---|---|
Fxn |
addInput(xdc.services.intern.xsr.Value.Observable obj,
int index)
Mark a given array element as a formal input to the Fxn. |
Fxn |
addInput(xdc.services.intern.xsr.Value.Observable obj,
java.lang.String name)
Mark the given field as a formal input to the Fxn. |
Fxn |
addOutput(xdc.services.intern.xsr.Value.Observable obj,
int index)
Mark a given array element as a formal output of the Fxn. |
Fxn |
addOutput(xdc.services.intern.xsr.Value.Observable obj,
java.lang.String name)
Mark the given field of the object as a formal output of the Fxn. |
java.lang.Object |
call(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable scope,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args)
A setter that is called whenever one of the inputs of the Fxn changes in value. |
boolean |
getStale()
Get whether this Fxn needs to be executed. |
java.lang.Object |
getStatus()
Get the exit status from the last time this Fxn was executed. |
void |
run()
Execute the Fxn body. |
void |
setStale(boolean stale)
Set whether the Fxn needs to be executed, typically because one of the inputs has changed value. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Fxn(Group group, org.mozilla.javascript.Callable body)
Method Detail |
---|
public java.lang.Object getStatus()
public Fxn addInput(xdc.services.intern.xsr.Value.Observable obj, java.lang.String name)
public Fxn addInput(xdc.services.intern.xsr.Value.Observable obj, int index)
public Fxn addOutput(xdc.services.intern.xsr.Value.Observable obj, java.lang.String name)
public Fxn addOutput(xdc.services.intern.xsr.Value.Observable obj, int index)
public boolean getStale()
public void setStale(boolean stale)
public void run()
public java.lang.Object call(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args)
call
in interface org.mozilla.javascript.Callable
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |