org.jwall.audit.script
Class ScriptRunner

java.lang.Object
  extended by org.jwall.audit.script.ScriptRunner

public final class ScriptRunner
extends Object

This task implements script execution on a cluster. The script is usually given as a plain string (script source), but may also be provided as an accessible URL.

Author:
Christian Bockermann <chris@jwall.org>

Field Summary
static String[] RESERVED_VARIABLES
           
 
Constructor Summary
ScriptRunner(String scriptLanguage)
           
ScriptRunner(String scriptSource, String scriptLanguage)
           
ScriptRunner(URL scriptUrl, String scriptLanguage)
           
 
Method Summary
 void bind(String key, Object val)
           
 void execute()
           
 Map<String,Object> getResults()
           
 void init(OutputStream out, OutputStream err)
           
static boolean isReservedVariable(String variable)
           
 void setAuditEventView(EventView<AuditEvent> view)
           
 void setErrorWriter(Writer out)
           
 void setLogMessageView(EventView<LogMessage> view)
           
 void setOutputWriter(Writer out)
           
 void setResults(Map<String,Object> results)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESERVED_VARIABLES

public static final String[] RESERVED_VARIABLES
Constructor Detail

ScriptRunner

public ScriptRunner(String scriptLanguage)
             throws Exception
Throws:
Exception

ScriptRunner

public ScriptRunner(URL scriptUrl,
                    String scriptLanguage)
             throws Exception
Parameters:
scriptUrl -
scriptLanguage -
Throws:
Exception

ScriptRunner

public ScriptRunner(String scriptSource,
                    String scriptLanguage)
             throws Exception
Parameters:
scriptSource -
scriptLanguage -
Throws:
Exception
Method Detail

init

public void init(OutputStream out,
                 OutputStream err)
          throws Exception
Throws:
Exception
See Also:
org.jwall.data.node.RemoteTask#init(org.slf4j.log, java.io.OutputStream)

setErrorWriter

public void setErrorWriter(Writer out)

setOutputWriter

public void setOutputWriter(Writer out)

bind

public void bind(String key,
                 Object val)
          throws Exception
Throws:
Exception

setAuditEventView

public void setAuditEventView(EventView<AuditEvent> view)

setLogMessageView

public void setLogMessageView(EventView<LogMessage> view)

setResults

public void setResults(Map<String,Object> results)

execute

public void execute()
             throws Exception
Throws:
Exception
See Also:
org.jwall.data.node.RemoteTask#execute(org.jwall.audit.EventView)

getResults

public Map<String,Object> getResults()

isReservedVariable

public static final boolean isReservedVariable(String variable)


Copyright © 2012 jwall.org. All Rights Reserved.