| java.lang.Object org.mozilla.javascript.Delegator org.mozilla.javascript.Synchronizer
Synchronizer | public class Synchronizer extends Delegator (Code) | | This class provides support for implementing Java-style synchronized
methods in Javascript.
Synchronized functions are created from ordinary Javascript
functions by the Synchronizer constructor, e.g.
new Packages.org.mozilla.javascript.Synchronizer(fun) .
The resulting object is a function that establishes an exclusive
lock on the this object of its invocation.
The Rhino shell provides a short-cut for the creation of
synchronized methods: sync(fun) has the same effect as
calling the above constructor.
See Also: org.mozilla.javascript.Delegator author: Matthias Radestock |
Constructor Summary | |
public | Synchronizer(Scriptable obj) Create a new synchronized function from an existing one. |
Synchronizer | public Synchronizer(Scriptable obj)(Code) | | Create a new synchronized function from an existing one.
Parameters: obj - the existing function |
Methods inherited from org.mozilla.javascript.Delegator | public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args)(Code)(Java Doc) public Scriptable construct(Context cx, Scriptable scope, Object[] args)(Code)(Java Doc) public void delete(String name)(Code)(Java Doc) public void delete(int index)(Code)(Java Doc) public Object get(String name, Scriptable start)(Code)(Java Doc) public Object get(int index, Scriptable start)(Code)(Java Doc) public String getClassName()(Code)(Java Doc) public Object getDefaultValue(Class hint)(Code)(Java Doc) public Scriptable getDelegee()(Code)(Java Doc) public Object[] getIds()(Code)(Java Doc) public Scriptable getParentScope()(Code)(Java Doc) public Scriptable getPrototype()(Code)(Java Doc) public boolean has(String name, Scriptable start)(Code)(Java Doc) public boolean has(int index, Scriptable start)(Code)(Java Doc) public boolean hasInstance(Scriptable instance)(Code)(Java Doc) protected Delegator newInstance()(Code)(Java Doc) public void put(String name, Scriptable start, Object value)(Code)(Java Doc) public void put(int index, Scriptable start, Object value)(Code)(Java Doc) public void setDelegee(Scriptable obj)(Code)(Java Doc) public void setParentScope(Scriptable parent)(Code)(Java Doc) public void setPrototype(Scriptable prototype)(Code)(Java Doc)
|
|
|