org.apache.cocoon
Class Cocoon

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.Cocoon
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.logger.LogKitManageable, Modifiable, Processor, org.apache.avalon.framework.thread.ThreadSafe

public class Cocoon
extends org.apache.avalon.framework.logger.AbstractLoggable
implements org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable, Modifiable, Processor, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.component.Composable, org.apache.avalon.excalibur.logger.LogKitManageable

The Cocoon Object is the main Kernel for the entire Cocoon system.

Version:
CVS $Id: Cocoon.java,v 1.22.2.6 2002/12/04 09:56:24 cziegeler Exp $
Author:
Pierpaolo Fumagalli (Apache Software Foundation, Exoffice Technologies), Stefano Mazzocchi, Leo Sutic

Fields inherited from interface org.apache.cocoon.Processor
ROLE
 
Constructor Summary
Cocoon()
          Creates a new Cocoon instance.
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          Get the parent component manager.
 org.apache.avalon.framework.configuration.Configuration configure(org.apache.avalon.excalibur.component.ExcaliburComponentManager startupManager)
          Configure this Cocoon instance.
 void contextualize(org.apache.avalon.framework.context.Context context)
          Describe contextualize method here.
protected  void debug(Environment environment, StreamPipeline pipeline, EventPipeline eventPipeline)
          Log debug information about the current environment.
 void dispose()
          Dispose this instance
 void generateSitemap(Environment environment)
          Process the given Environment to generate the sitemap.
 int getActiveRequestCount()
          Accessor for active request count
 void initialize()
          The initialize method
 boolean modifiedSince(long date)
          Queries the class to estimate its ergodic period termination.
 void precompile(java.lang.String fileName, Environment environment, java.lang.String markupLanguage, java.lang.String programmingLanguage)
          Process the given Environment to generate Java code for specified XSP files.
 boolean process(Environment environment)
          Process the given Environment to produce the output.
 boolean process(Environment environment, StreamPipeline pipeline, EventPipeline eventPipeline)
          Process the given Environment to assemble a StreamPipeline and an EventPipeline.
 void setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logKitManager)
          The setLogKitManager method will get a LogKitManager for further use.
protected  void setSystemProperties()
          Sets required system properties.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cocoon

public Cocoon()
       throws org.apache.avalon.framework.configuration.ConfigurationException
Creates a new Cocoon instance.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - if an error occurs
Method Detail

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
Get the parent component manager. For purposes of avoiding extra method calls, the manager parameter may be null.
Specified by:
compose in interface org.apache.avalon.framework.component.Composable
Parameters:
manager - the parent component manager. May be null

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Describe contextualize method here.
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Parameters:
context - a Context value
Throws:
org.apache.avalon.framework.context.ContextException - if an error occurs

setLogKitManager

public void setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logKitManager)
The setLogKitManager method will get a LogKitManager for further use.
Specified by:
setLogKitManager in interface org.apache.avalon.excalibur.logger.LogKitManageable
Parameters:
logKitManager - a LogKitManager value

initialize

public void initialize()
                throws java.lang.Exception
The initialize method
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception - if an error occurs

configure

public org.apache.avalon.framework.configuration.Configuration configure(org.apache.avalon.excalibur.component.ExcaliburComponentManager startupManager)
                                                                  throws org.apache.avalon.framework.configuration.ConfigurationException,
                                                                         org.apache.avalon.framework.context.ContextException
Configure this Cocoon instance.
Parameters:
startupManager - an ExcaliburComponentManager value
Returns:
a Configuration value
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - if an error occurs
org.apache.avalon.framework.context.ContextException - if an error occurs

modifiedSince

public boolean modifiedSince(long date)
Queries the class to estimate its ergodic period termination.
Specified by:
modifiedSince in interface Modifiable
Parameters:
date - a long value
Returns:
a boolean value

setSystemProperties

protected void setSystemProperties()
Sets required system properties.

dispose

public void dispose()
Dispose this instance
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable

debug

protected void debug(Environment environment,
                     StreamPipeline pipeline,
                     EventPipeline eventPipeline)
Log debug information about the current environment.
Parameters:
environment - an Environment value
pipeline - a StreamPipeline value
eventPipeline - an EventPipeline value

process

public boolean process(Environment environment)
                throws java.lang.Exception
Process the given Environment to produce the output.
Specified by:
process in interface Processor
Parameters:
environment - an Environment value
Returns:
a boolean value
Throws:
java.lang.Exception - if an error occurs

process

public boolean process(Environment environment,
                       StreamPipeline pipeline,
                       EventPipeline eventPipeline)
                throws java.lang.Exception
Process the given Environment to assemble a StreamPipeline and an EventPipeline.
Specified by:
process in interface Processor
Parameters:
environment - an Environment value
pipeline - a StreamPipeline value
eventPipeline - an EventPipeline value
Returns:
a boolean value
Throws:
java.lang.Exception - if an error occurs

generateSitemap

public void generateSitemap(Environment environment)
                     throws java.lang.Exception
Process the given Environment to generate the sitemap. Delegated to the Processor component if it's a SitemapManager.
Parameters:
environment - an Environment value
Throws:
java.lang.Exception - if an error occurs

precompile

public void precompile(java.lang.String fileName,
                       Environment environment,
                       java.lang.String markupLanguage,
                       java.lang.String programmingLanguage)
                throws java.lang.Exception
Process the given Environment to generate Java code for specified XSP files.
Parameters:
fileName - a String value
environment - an Environment value
Throws:
java.lang.Exception - if an error occurs

getActiveRequestCount

public int getActiveRequestCount()
Accessor for active request count


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.