org.apache.cocoon.components.flow.java
Class JavaInterpreter

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.java.JavaInterpreter
All Implemented Interfaces:
Disposable, Component, Configurable, Contextualizable, LogEnabled, Serviceable, SingleThreaded, Interpreter

public class JavaInterpreter
extends AbstractInterpreter
implements Configurable

Implementation of the java flow interpreter.

Version:
CVS $Id: JavaInterpreter.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Stephan Michels

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.cocoon.components.flow.Interpreter
Interpreter.Argument
 
Field Summary
static String USER_GLOBAL_SCOPE
          Key for storing a global scope object in the Cocoon session
 
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
JavaInterpreter()
           
 
Method Summary
 void callFunction(String function, List params, Redirector redirector)
          Calls a Java function, passing params as its arguments.
 void configure(Configuration config)
           
 void handleContinuation(String id, List params, Redirector redirector)
          Continues a previously started processing.
 void initialize()
           
 
Methods inherited from class org.apache.cocoon.components.flow.AbstractInterpreter
contextualize, dispose, forwardTo, getInterpreterID, process, register, service, 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
 

Field Detail

USER_GLOBAL_SCOPE

public static final String USER_GLOBAL_SCOPE
Key for storing a global scope object in the Cocoon session

See Also:
Constant Field Values
Constructor Detail

JavaInterpreter

public JavaInterpreter()
Method Detail

configure

public void configure(Configuration config)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Overrides:
configure in class AbstractInterpreter
Throws:
ConfigurationException

initialize

public void initialize()
                throws Exception
Throws:
Exception

callFunction

public void callFunction(String function,
                         List params,
                         Redirector redirector)
                  throws Exception
Calls a Java function, passing params as its arguments. In addition to this, it makes available the parameters through the cocoon.parameters Java array (indexed by the parameter names).

Specified by:
callFunction in interface Interpreter
Parameters:
function - a String value
params - a List value
redirector -
Throws:
Exception - if an error occurs

handleContinuation

public void handleContinuation(String id,
                               List params,
                               Redirector redirector)
                        throws Exception
Description copied from interface: Interpreter
Continues a previously started processing. The continuation object where the processing should start from is indicated by the continuationId string.

Specified by:
handleContinuation in interface Interpreter
Parameters:
id - a String value
params - a List value, containing the parameters to be passed when invoking the continuation. As opposed to the parameters passed by callFunction, these parameters will only become available in the language's environment, if at all.
redirector - a Redirector used to call views
Throws:
Exception - if an error occurs


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