org.boris.xlloop.script
Class ScriptRepository

java.lang.Object
  extended by org.boris.xlloop.script.ScriptRepository
All Implemented Interfaces:
FunctionProvider, IFunctionHandler, FileSystemWatcher.Callback

public class ScriptRepository
extends java.lang.Object
implements FileSystemWatcher.Callback, IFunctionHandler, FunctionProvider


Constructor Summary
ScriptRepository(java.io.File baseDir, java.lang.String namespace)
           
 
Method Summary
 void addFactory(java.lang.String language, ScriptFactory factory)
           
 IFunction create(java.io.File f)
           
 XLoper execute(IFunctionContext context, java.lang.String name, XLoper[] args)
           
 void fileAdded(java.io.File f)
           
 void fileChanged(java.io.File f)
           
 void fileRemoved(java.io.File f)
           
 IFunction get(java.lang.String name)
           
 FunctionInformation[] getFunctions()
           
 boolean hasFunction(java.lang.String name)
           
 void setWatcherPauseMillis(int millis)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptRepository

public ScriptRepository(java.io.File baseDir,
                        java.lang.String namespace)
Method Detail

addFactory

public void addFactory(java.lang.String language,
                       ScriptFactory factory)

setWatcherPauseMillis

public void setWatcherPauseMillis(int millis)

stop

public void stop()

get

public IFunction get(java.lang.String name)

fileAdded

public void fileAdded(java.io.File f)
Specified by:
fileAdded in interface FileSystemWatcher.Callback

fileChanged

public void fileChanged(java.io.File f)
Specified by:
fileChanged in interface FileSystemWatcher.Callback

fileRemoved

public void fileRemoved(java.io.File f)
Specified by:
fileRemoved in interface FileSystemWatcher.Callback

execute

public XLoper execute(IFunctionContext context,
                      java.lang.String name,
                      XLoper[] args)
               throws RequestException
Specified by:
execute in interface IFunctionHandler
Throws:
RequestException

hasFunction

public boolean hasFunction(java.lang.String name)
Specified by:
hasFunction in interface IFunctionHandler

create

public IFunction create(java.io.File f)
                 throws BSFException,
                        java.io.IOException
Throws:
BSFException
java.io.IOException

getFunctions

public FunctionInformation[] getFunctions()
Specified by:
getFunctions in interface FunctionProvider