Cocoon API: Class Engine

org.apache.cocoon
Class Engine

java.lang.Object
  |
  +--org.apache.cocoon.Engine
All Implemented Interfaces:
Defaults

public class Engine
extends java.lang.Object
implements Defaults

The Cocoon publishing engine. This class implements the engine that does all the document processing.

Version:
$Revision: 1.50 $ $Date: 2001/01/24 15:52:22 $
Author:
Stefano Mazzocchi, Robin Green

Field Summary
static Changeable UNCACHEABLE
           
 
Fields inherited from interface org.apache.cocoon.Defaults
BROWSERS_PROP, CACHE_DEFAULT, CACHE_PROP, COCOON_FORMAT_PI, COCOON_PROCESS_PI, DEFAULT_BROWSER, DISABLE_CACHING_PI, ERROR_INTERNALLY, FORMATTER_PROP, HOME, INIT_ARG, INTERPRETER_PROP, LOG, LOG_LEVEL, LOOPS, NAME, OUTPUTTING, PARSER_DEFAULT, PARSER_PROP, PROCESSOR_PROP, PRODUCER_PROP, PROFILER_DEFAULT, PROFILER_PROP, PROPERTIES, SHOW_STATUS, STATUS_URL, STATUS_URL_DEFAULT, STORE_DEFAULT, STORE_PROP, STYLESHEET_PI, TRANSFORMER_DEFAULT, TRANSFORMER_PROP, VERSION, WHOLE_REQUEST, YEAR
 
Method Summary
 void destroy()
           
static Engine getInstance()
          This is the getInstance() version that should be used by anything other than the Cocoon servlet itself.
static Engine getInstance(Configurations confs, java.lang.Object context)
          This will return a new instance of the Engine class, and handle pooling of instances.
 java.util.Hashtable getStatus()
          Returns an hashtable of parameters used to report the internal status.
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method is called to start the processing when calling the engine from the Cocoon servlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNCACHEABLE

public static final Changeable UNCACHEABLE
Method Detail

getInstance

public static Engine getInstance(Configurations confs,
                                 java.lang.Object context)
                          throws java.lang.Exception
This will return a new instance of the Engine class, and handle pooling of instances. In this implementation, one instance is created per servlet context. This replaces using the constructor directly, because now the Cocoon servlet can initialize the Engine, and other servlets and classes can use the same engine, in order to funnel requests through Cocoon.
Parameters:
confs - - Configuration file information
context - - Object to use for Servlet Context
Returns:
Engine - instance to operate on
Throws:
java.lang.Exception - - when things go awry

getInstance

public static Engine getInstance()
                          throws java.lang.Exception
This is the getInstance() version that should be used by anything other than the Cocoon servlet itself. This assumes that the engine has been set up and is ready to be used. If this is called before the instance has been correctly created, it throws an exception.
Returns:
Engine - instance to operate on

handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.lang.Exception
This method is called to start the processing when calling the engine from the Cocoon servlet.

getStatus

public java.util.Hashtable getStatus()
Returns an hashtable of parameters used to report the internal status.

destroy

public void destroy()


Copyright 1999-2001 Apache Software Foundation. All Rights Reserved.