|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.storm.Scripter
Scripting language interpreter. Object of this class represents an instance of the interpreter of some scripting language for a Pilot. Note that for a new instance of a Pilot a new instance of the Scripter is created. It's up to the Pilot to expose necessary properties into the Scripter so that the user scripts can access system stuff.
| Constructor Summary | |
Scripter()
|
|
| Method Summary | |
abstract Object |
_unwrap(Object scriptObject)
Internal API |
protected Viewport |
contextViewport()
|
abstract void |
dispose()
Dispose of this scripter instance |
Object |
enterExecutionFrame(Viewport contextViewport)
|
abstract Object |
eval(Viewport view,
String script,
String url,
int startLine)
Called by the browser and/or pilots to execute commands in the scripting language |
abstract boolean |
evalCallback(Viewport view,
Object function,
Object[] args)
|
Object |
evalCodeLocation(Viewport view,
String codeLocation)
Evaluate pseudo-location like in javascript:alert("Hello!") Assumes that location starts with "scrit-alias:" |
abstract boolean |
evalEventHandler(Viewport view,
DynamicObject handlerThis,
Object handler,
DynamicObject event)
Called by the browser and/or pilots to execute event handlers in the scripting language from Java |
static int |
executionNestingLevel()
|
void |
exitExecutionFrame(Object parentExecution)
|
abstract void |
init(StormBase base)
Initialize a Scripter instance int the specified StormBase |
abstract void |
resume()
|
abstract String |
scripterName()
Get default scripter name |
abstract void |
suspend()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Scripter()
| Method Detail |
public abstract String scripterName()
public abstract void init(StormBase base)
base - the StormBase where the scripter will be runningpublic abstract void dispose()
public abstract Object eval(Viewport view,
String script,
String url,
int startLine)
view - viewport containing the scriptscript - the script to executeurl - location of file with scriptstartLine - starting lineNumber in the url
public Object evalCodeLocation(Viewport view,
String codeLocation)
public abstract boolean evalEventHandler(Viewport view,
DynamicObject handlerThis,
Object handler,
DynamicObject event)
view - viewport containing the scripthandlerThis - object that provides notion of this for handlerhandler - object to execute as event handlerevent - event object to supply to the handler
public abstract boolean evalCallback(Viewport view,
Object function,
Object[] args)
public abstract Object _unwrap(Object scriptObject)
public abstract void suspend()
public abstract void resume()
public final Object enterExecutionFrame(Viewport contextViewport)
public final void exitExecutionFrame(Object parentExecution)
protected Viewport contextViewport()
public static int executionNestingLevel()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||