public class Fxn
extends java.lang.Object
implements org.mozilla.javascript.Callable
Constructor and Description |
---|
Fxn(Group group,
org.mozilla.javascript.Callable body)
Create a new Fxn that will execute the given body, as scheduled
by the given Group.
|
Modifier and Type | Method and Description |
---|---|
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) |
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() |
public Fxn(Group group, org.mozilla.javascript.Callable body)
group
- the group of which this functiion belongsbody
- the function's contentpublic java.lang.Object getStatus()
public Fxn addInput(xdc.services.intern.xsr.Value.Observable obj, java.lang.String name)
obj
- an observable objname
- the name of a field of objpublic Fxn addInput(xdc.services.intern.xsr.Value.Observable obj, int index)
obj
- an observable array objindex
- an index into the array objpublic Fxn addOutput(xdc.services.intern.xsr.Value.Observable obj, java.lang.String name)
obj
- an observable array objname
- the name of a field of objpublic Fxn addOutput(xdc.services.intern.xsr.Value.Observable obj, int index)
obj
- an observable array objindex
- an index into the array objpublic boolean getStale()
public void setStale(boolean stale)
stale
- set the stale state of this Fxnpublic 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