| java.lang.Object com.caucho.es.ScriptClosure
ScriptClosure | final public class ScriptClosure (Code) | | ScriptClosure lets Java programs call JavaScript functions. It contains
the state of an executing JavaScript program.
|
Method Summary | |
public synchronized Object | call(String name) Calls the JavaScript function 'name' with no arguments.
Parameters: name - JavaScript function name. | public synchronized Object | call(String name, Object a) Calls the JavaScript function 'name' with a single argument.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: a - First argument passed to JavaScript. | public synchronized Object | call(String name, Object a, Object b) Calls the JavaScript function 'name' with two arguments.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: a - First argument passed to JavaScript. Parameters: b - Second argument passed to JavaScript. | public synchronized Object | call(String name, Object a, Object b, Object c) Calls the JavaScript function 'name' with three arguments.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: a - First argument passed to JavaScript. Parameters: b - Second argument passed to JavaScript. Parameters: c - Third argument passed to JavaScript. | public synchronized Object | call(String name, Object a, Object b, Object c, Object d) Calls the JavaScript function 'name' with four arguments.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: a - First argument passed to JavaScript. Parameters: b - Second argument passed to JavaScript. Parameters: c - Third argument passed to JavaScript. Parameters: d - Fourth argument passed to JavaScript. | public synchronized Object | call(String name, Object[] args) Calls the JavaScript function 'name' with an array of arguments.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: args - Arguments to pass to the JavaScript function. | public synchronized Object | getProperty(String name) Returns a global property of the closure. | public boolean | isModified() Returns the lastModified time of the script. | public synchronized void | setProperty(String name, Object value) Sets a global property of the closure. |
call | public synchronized Object call(String name) throws Throwable(Code) | | Calls the JavaScript function 'name' with no arguments.
Parameters: name - JavaScript function name. The Java object returned by the JavaScript function. |
call | public synchronized Object call(String name, Object a) throws Throwable(Code) | | Calls the JavaScript function 'name' with a single argument.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: a - First argument passed to JavaScript. The Java object returned by the JavaScript function. |
call | public synchronized Object call(String name, Object a, Object b) throws Throwable(Code) | | Calls the JavaScript function 'name' with two arguments.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: a - First argument passed to JavaScript. Parameters: b - Second argument passed to JavaScript. The Java object returned by the JavaScript function. |
call | public synchronized Object call(String name, Object a, Object b, Object c) throws Throwable(Code) | | Calls the JavaScript function 'name' with three arguments.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: a - First argument passed to JavaScript. Parameters: b - Second argument passed to JavaScript. Parameters: c - Third argument passed to JavaScript. The Java object returned by the JavaScript function. |
call | public synchronized Object call(String name, Object a, Object b, Object c, Object d) throws Throwable(Code) | | Calls the JavaScript function 'name' with four arguments.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: a - First argument passed to JavaScript. Parameters: b - Second argument passed to JavaScript. Parameters: c - Third argument passed to JavaScript. Parameters: d - Fourth argument passed to JavaScript. The Java object returned by the JavaScript function. |
call | public synchronized Object call(String name, Object[] args) throws Throwable(Code) | | Calls the JavaScript function 'name' with an array of arguments.
Arguments are automatically wrapped, and return values automatically
unwrapped.
Parameters: name - JavaScript function name. Parameters: args - Arguments to pass to the JavaScript function. The Java object returned by the JavaScript function. |
getProperty | public synchronized Object getProperty(String name)(Code) | | Returns a global property of the closure.
Parameters: name - name of the global property unwrapped Java object of the global property. |
isModified | public boolean isModified()(Code) | | Returns the lastModified time of the script. The last modified
time is the maximum of all imported script modified times.
getLastModified is vital for dynamic applications like JSP
which need to reload the script when it changes.
|
setProperty | public synchronized void setProperty(String name, Object value)(Code) | | Sets a global property of the closure.
Parameters: name - name of the global property Parameters: value - Java object to assign to the global property. |
|
|