org.walluck.oscar.script
Class ScriptInterpreter

java.lang.Object
  extended by org.walluck.oscar.script.ScriptInterpreter

public class ScriptInterpreter
extends Object

Handles python scripts.

Since:
1.0
Version:
1.0
Author:
David Walluck

Constructor Summary
ScriptInterpreter(AIMSession sess, AIMConnection conn, Oscar oscar)
          Creates a new script interpreter.
 
Method Summary
 void addScript(Script script)
          Add a script.
 void addTimeoutHandler(Script script, int time, boolean forever, String code)
          Add a timeout handler for a script.
 void executeScriptFile(String filename)
          Executes a script file.
 ArrayList getScripts()
          Return the value of scripts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptInterpreter

public ScriptInterpreter(AIMSession sess,
                         AIMConnection conn,
                         Oscar oscar)
Creates a new script interpreter.

Parameters:
sess - the oscar session
conn - the bos connection for this session
oscar - the oscar interface for this client
Method Detail

executeScriptFile

public void executeScriptFile(String filename)
Executes a script file.

Parameters:
filename - the script file

addTimeoutHandler

public void addTimeoutHandler(Script script,
                              int time,
                              boolean forever,
                              String code)
Add a timeout handler for a script.

Parameters:
script - the script
time - the time in milliseconds
forever - whether or not to repeat forever
code - the code to execute when the timeout occurs

addScript

public void addScript(Script script)
Add a script.

Parameters:
script - the script to add

getScripts

public ArrayList getScripts()
Return the value of scripts.

Returns:
the value of scripts