|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.semwebcentral.sweetrules.util.SweetScriptLauncher
Created on Nov 1, 2004 A utility to launch a script file.
Nested Class Summary | |
private class |
SweetScriptLauncher.StreamHandler
|
Field Summary | |
private static SweetScriptLauncher |
sweetScriptLauncher
Singleton instance |
Constructor Summary | |
private |
SweetScriptLauncher()
The hidden constructor |
Method Summary | |
static SweetScriptLauncher |
getInstance()
Accessor for the singleton |
int |
invokeDefaultShell(java.lang.String scriptName,
java.lang.String[] scriptArgs)
Invokes a shell based on configuration settings. |
int |
launchScript(java.lang.String shellPath,
java.lang.String[] shellOptions,
java.lang.String scriptPath,
java.lang.String[] scriptArgs)
Launches a script in the specified shell and passes the appropriate command line arguments to the script. |
private void |
redirectStreams(java.lang.Process process)
Explicitly read the process's stream and redirect them to the calling process's streams |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static SweetScriptLauncher sweetScriptLauncher
Constructor Detail |
private SweetScriptLauncher()
Method Detail |
public int invokeDefaultShell(java.lang.String scriptName, java.lang.String[] scriptArgs) throws SweetException
scriptName
- The name of the script, using the final properties in SweetConfigLoaderscriptArgs
- The arguments to the script
SweetException
- if an error occurspublic int launchScript(java.lang.String shellPath, java.lang.String[] shellOptions, java.lang.String scriptPath, java.lang.String[] scriptArgs) throws SweetException
shellPath
- The shell process to host the scriptshellOptions
- The options for the shellscriptPath
- The path to the scriptscriptArgs
- The arguments to the script
SweetException
private void redirectStreams(java.lang.Process process) throws java.io.IOException
process
- The process whose streams are to be
redirected
java.io.IOException
- if an error occurspublic static SweetScriptLauncher getInstance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |