org.aitools.programd.util
Class AIMLWatcher

java.lang.Object
  extended by org.aitools.programd.util.AIMLWatcher

public class AIMLWatcher
extends Object

Watches a set of AIML files. Any file changes will be loaded automatically.

Version:
4.6
Author:
Jon Baer, Noel Bush

Field Summary
protected  org.apache.log4j.Logger logger
           
protected  Map<URL,Long> watchMap
          Used for storing information about file changes.
 
Constructor Summary
AIMLWatcher(Core coreToUse)
          Creates a new AIMLWatcher using the given Graphmaster
 
Method Summary
 void addWatchFile(URL path)
          Adds a file to the watchlist.
protected  void reload(URL path)
          Reloads AIML from a given path.
 void start()
          Starts the AIMLWatcher.
 void stop()
          Stops the AIMLWatcher.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

watchMap

protected Map<URL,Long> watchMap
Used for storing information about file changes.


logger

protected org.apache.log4j.Logger logger
Constructor Detail

AIMLWatcher

public AIMLWatcher(Core coreToUse)
Creates a new AIMLWatcher using the given Graphmaster

Parameters:
coreToUse - the Core to use
Method Detail

start

public void start()
Starts the AIMLWatcher.


stop

public void stop()
Stops the AIMLWatcher.


reload

protected void reload(URL path)
Reloads AIML from a given path.

Parameters:
path - the path to reload

addWatchFile

public void addWatchFile(URL path)
Adds a file to the watchlist.

Parameters:
path - the path to the file