zero.core.interpreter
Interface Interpreter
public interface Interpreter
Interpreter represents the part of the request-handling process that uses
language or platform-specific APIs to load and invoke the script (or class)
for a given request URI. For example, if a URI maps to a Groovy script,
an interpreter class for .groovy files would take over the request processing
and use Groovy APIs to set up and invoke the script. Zero includes interpreter
classes for Java, Groovy, and PHP files by default; users can add support for
their own file types (languages) by implementing this interface and adding an
entry to their zero.config file:
/config/interpreters/.fileExtension="your.interpreter.ClassName"The HandlerInfo object passed to Interpreter.invoke() will have all of the data you need to find and invoke your script. The most important piece of data is HandlerInfo.handler, which is the relative path to the file that should be executed.
Method Summary
| void | invoke(HandlerInfo handerInfo) |