org.apache.cocoon.components.flow
Class CompilingInterpreter

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.flow.AbstractInterpreter
          extended by org.apache.cocoon.components.flow.CompilingInterpreter
All Implemented Interfaces:
Disposable, Component, Configurable, Contextualizable, LogEnabled, Serviceable, SingleThreaded, Interpreter
Direct Known Subclasses:
FOM_JavaScriptInterpreter

public abstract class CompilingInterpreter
extends AbstractInterpreter

This is a base class for all interpreters compiling the scripts

Version:
CVS $Id: CompilingInterpreter.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Ovidiu Predescu, Marcus Crafter, Carsten Ziegeler

Nested Class Summary
protected  class CompilingInterpreter.ScriptSourceEntry
           
 
Nested classes/interfaces inherited from interface org.apache.cocoon.components.flow.Interpreter
Interpreter.Argument
 
Field Summary
protected  Map compiledScripts
          Mapping of String objects (source uri's) to ScriptSourceEntry's
protected  SourceResolver sourceresolver
          A source resolver
 
Fields inherited from class org.apache.cocoon.components.flow.AbstractInterpreter
avalonContext, checkTime, context, continuationsMgr, manager, needResolve, reloadScripts
 
Fields inherited from interface org.apache.cocoon.components.flow.Interpreter
ROLE
 
Constructor Summary
CompilingInterpreter()
           
 
Method Summary
protected abstract  org.mozilla.javascript.Script compileScript(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable scope, Source source)
          TODO - This is a little bit strange, the interpreter calls get Script on the ScriptSourceEntry which in turn calls compileScript on the interpreter.
 void dispose()
           
 void service(ServiceManager manager)
          Composable
 
Methods inherited from class org.apache.cocoon.components.flow.AbstractInterpreter
configure, contextualize, forwardTo, getInterpreterID, process, register, setInterpreterID
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.components.flow.Interpreter
callFunction, handleContinuation
 

Field Detail

sourceresolver

protected SourceResolver sourceresolver
A source resolver


compiledScripts

protected Map compiledScripts
Mapping of String objects (source uri's) to ScriptSourceEntry's

Constructor Detail

CompilingInterpreter

public CompilingInterpreter()
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Composable

Specified by:
service in interface Serviceable
Overrides:
service in class AbstractInterpreter
Throws:
ServiceException

dispose

public void dispose()
Specified by:
dispose in interface Disposable
Overrides:
dispose in class AbstractInterpreter

compileScript

protected abstract org.mozilla.javascript.Script compileScript(org.mozilla.javascript.Context context,
                                                               org.mozilla.javascript.Scriptable scope,
                                                               Source source)
                                                        throws Exception
TODO - This is a little bit strange, the interpreter calls get Script on the ScriptSourceEntry which in turn calls compileScript on the interpreter. I think we need more refactoring here.

Throws:
Exception


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.