| org.archive.crawler.framework.Processor org.archive.crawler.processor.BeanShellProcessor
BeanShellProcessor | public class BeanShellProcessor extends Processor implements FetchStatusCodes(Code) | | A processor which runs a BeanShell script on the CrawlURI.
Script source may be provided via a file
local to the crawler.
Script source should define
a method with one argument, 'run(curi)'. Each processed CrawlURI is
passed to this script method.
Other variables available to the script include 'self' (this
BeanShellProcessor instance) and 'controller' (the crawl's
CrawlController instance).
author: gojomo version: $Date: 2006-09-25 20:19:54 +0000 (Mon, 25 Sep 2006) $, $Revision: 4654 $ |
Method Summary | |
protected Interpreter | getInterpreter() Get the proper Interpreter instance -- either shared or local
to this thread. | protected void | initialTasks() | protected synchronized void | innerProcess(CrawlURI curi) | public void | kickUpdate() Setup (or reset) Intepreter variables, as appropraite based on
thread-isolation setting. | protected Interpreter | newInterpreter() Create a new Interpreter instance, preloaded with any supplied
source code or source file and the variables 'self' (this
BeanShellProcessor) and 'controller' (the CrawlController). |
ATTR_ISOLATE_THREADS | final public static String ATTR_ISOLATE_THREADS(Code) | | whether each thread should have its own script runner (true), or
they should share a single script runner with synchronized access
|
ATTR_SCRIPT_FILE | final public static String ATTR_SCRIPT_FILE(Code) | | setting for script file
|
sharedInterpreter | protected Interpreter sharedInterpreter(Code) | | |
BeanShellProcessor | public BeanShellProcessor(String name)(Code) | | Constructor.
Parameters: name - Name of this processor. |
getInterpreter | protected Interpreter getInterpreter()(Code) | | Get the proper Interpreter instance -- either shared or local
to this thread.
Interpreter to use |
initialTasks | protected void initialTasks()(Code) | | |
innerProcess | protected synchronized void innerProcess(CrawlURI curi)(Code) | | |
kickUpdate | public void kickUpdate()(Code) | | Setup (or reset) Intepreter variables, as appropraite based on
thread-isolation setting.
|
newInterpreter | protected Interpreter newInterpreter()(Code) | | Create a new Interpreter instance, preloaded with any supplied
source code or source file and the variables 'self' (this
BeanShellProcessor) and 'controller' (the CrawlController).
the new Interpreter instance |
|
|