|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.script.GroovyService
public class GroovyService
Implements support for Groovy-based scripting.
This supports both Interpret Script and Script Console commands on the View menu, the latter opening up a console written in the scripting language Groovy (rather than Java).
| Field Summary | |
|---|---|
static String |
DEFAULT_CONSOLE_SCRIPT
The default value for the path to the Groovy console script. |
static String |
GROOVY_VERSION
The Groovy JSR version. |
protected static groovy.util.GroovyScriptEngine |
m_gse
The single instance of the GroovyScriptEngine used by this class. |
static String |
PROPERTY_SCRIPTS_PATH
The System property name for the path to the Groovy 'scripts' directory. |
| Constructor Summary | |
|---|---|
GroovyService(MessageWriter messagewriter,
String scriptsPath)
Constructor with a MessageWriter and a required pathname scriptsPath, which points to the default 'scripts' directory. |
|
| Method Summary | |
|---|---|
void |
closeService()
This should be called prior to the GroovyService going away. |
void |
console()
Display a Groovy Console. |
groovy.util.GroovyScriptEngine |
getGroovyScriptEngine()
Return the GroovyScriptEngine. |
static boolean |
hasService()
Returns true if the (static) GroovyScriptEngine has been initialized. |
boolean |
interpret(File file)
Interpret the incoming script (sourced from File file), returning true if successful. |
boolean |
interpret(String script)
Interpret the incoming script, returning true if successful. |
void |
print(String message)
|
void |
println(String message)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String DEFAULT_CONSOLE_SCRIPT
public static final String PROPERTY_SCRIPTS_PATH
public static final String GROOVY_VERSION
protected static groovy.util.GroovyScriptEngine m_gse
| Constructor Detail |
|---|
public GroovyService(MessageWriter messagewriter,
String scriptsPath)
throws ScriptException
PROPERTY_SCRIPTS_PATH will
be tried.
ScriptException| Method Detail |
|---|
public groovy.util.GroovyScriptEngine getGroovyScriptEngine()
throws ScriptException
ScriptExceptionpublic void console()
public boolean interpret(File file)
public void println(String message)
public void print(String message)
public boolean interpret(String script)
public static boolean hasService()
public void closeService()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||