org.apache.cocoon.servlet
Class CocoonServlet.ServletBootstrapEnvironment

java.lang.Object
  extended byorg.apache.cocoon.servlet.CocoonServlet.ServletBootstrapEnvironment
All Implemented Interfaces:
BootstrapEnvironment
Enclosing class:
CocoonServlet

protected static final class CocoonServlet.ServletBootstrapEnvironment
extends Object
implements BootstrapEnvironment


Nested Class Summary
 
Nested classes inherited from class org.apache.cocoon.core.BootstrapEnvironment
BootstrapEnvironment.LogLevel
 
Field Summary
 Logger logger
           
 
Constructor Summary
CocoonServlet.ServletBootstrapEnvironment(ServletConfig config, String writeablePath, String path)
           
 
Method Summary
 void configure(DefaultContext context)
          This callback can be used by the environment to add environment specific information.
 void configure(MutableSettings settings)
          This callback can be used by the environment to add environment specific settings.
 void configureLoggingContext(DefaultContext context)
          This callback can be used by the environment to add environment specific information for the logging system.
 Logger getBootstrapLogger(BootstrapEnvironment.LogLevel logLevel)
          Get the bootstrap logger.
 URL getConfigFile(String configFileName)
          Set the ConfigFile for the Cocoon object.
 File getContextForWriting()
          Returns a file to the application context.
 String getContextURL()
          Returns the URL to the application context.
 Context getEnvironmentContext()
          Create the context object of the environment.
 void log(String message)
          Log a message during bootstrapping.
 void log(String message, Throwable error)
          Log a message during bootstrapping.
 void setLogger(Logger rootLogger)
          Pass the root logger back to the environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public Logger logger
Constructor Detail

CocoonServlet.ServletBootstrapEnvironment

public CocoonServlet.ServletBootstrapEnvironment(ServletConfig config,
                                                 String writeablePath,
                                                 String path)
Method Detail

getBootstrapLogger

public Logger getBootstrapLogger(BootstrapEnvironment.LogLevel logLevel)
Description copied from interface: BootstrapEnvironment
Get the bootstrap logger.

Specified by:
getBootstrapLogger in interface BootstrapEnvironment
Parameters:
logLevel - The log level to use according to the Logger interface.
See Also:
BootstrapEnvironment.getBootstrapLogger(org.apache.cocoon.core.BootstrapEnvironment.LogLevel)

log

public void log(String message)
Description copied from interface: BootstrapEnvironment
Log a message during bootstrapping. This is used to log information before the logging system is setup.

Specified by:
log in interface BootstrapEnvironment
Parameters:
message - A message.
See Also:
BootstrapEnvironment.log(java.lang.String)

log

public void log(String message,
                Throwable error)
Description copied from interface: BootstrapEnvironment
Log a message during bootstrapping. This is used to log information before the logging system is setup.

Specified by:
log in interface BootstrapEnvironment
Parameters:
message - A message.
error - An error.
See Also:
BootstrapEnvironment.log(java.lang.String, java.lang.Throwable)

setLogger

public void setLogger(Logger rootLogger)
Description copied from interface: BootstrapEnvironment
Pass the root logger back to the environment. As soon as the logging system is set up, this method is called.

Specified by:
setLogger in interface BootstrapEnvironment
Parameters:
rootLogger - The root logger.
See Also:
BootstrapEnvironment.setLogger(org.apache.avalon.framework.logger.Logger)

configure

public void configure(MutableSettings settings)
Description copied from interface: BootstrapEnvironment
This callback can be used by the environment to add environment specific settings. For example the servlet environment parsed the web.xml and adjusts the settings based on the parameters.

Specified by:
configure in interface BootstrapEnvironment
Parameters:
settings - The settings for Cocoon.
See Also:
BootstrapEnvironment.configure(org.apache.cocoon.core.MutableSettings)

getEnvironmentContext

public Context getEnvironmentContext()
Description copied from interface: BootstrapEnvironment
Create the context object of the environment.

Specified by:
getEnvironmentContext in interface BootstrapEnvironment
Returns:
The context object.
See Also:
BootstrapEnvironment.getEnvironmentContext()

getContextURL

public String getContextURL()
Description copied from interface: BootstrapEnvironment
Returns the URL to the application context.

Specified by:
getContextURL in interface BootstrapEnvironment
See Also:
BootstrapEnvironment.getContextURL()

getContextForWriting

public File getContextForWriting()
Description copied from interface: BootstrapEnvironment
Returns a file to the application context.

Specified by:
getContextForWriting in interface BootstrapEnvironment
Returns:
A file pointing to the context or null if the context is not writeable.
See Also:
BootstrapEnvironment.getContextForWriting()

configureLoggingContext

public void configureLoggingContext(DefaultContext context)
Description copied from interface: BootstrapEnvironment
This callback can be used by the environment to add environment specific information for the logging system.

Specified by:
configureLoggingContext in interface BootstrapEnvironment
Parameters:
context - The context passed to the logging system.
See Also:
BootstrapEnvironment.configureLoggingContext(org.apache.avalon.framework.context.DefaultContext)

configure

public void configure(DefaultContext context)
Description copied from interface: BootstrapEnvironment
This callback can be used by the environment to add environment specific information.

Specified by:
configure in interface BootstrapEnvironment
Parameters:
context - The context passed to all Avalon based components that are context aware.
See Also:
BootstrapEnvironment.configure(org.apache.avalon.framework.context.DefaultContext)

getConfigFile

public URL getConfigFile(String configFileName)
                  throws Exception
Description copied from interface: BootstrapEnvironment
Set the ConfigFile for the Cocoon object.

Specified by:
getConfigFile in interface BootstrapEnvironment
Parameters:
configFileName - The file location for the cocoon.xconf
Throws:
Exception
See Also:
BootstrapEnvironment.getConfigFile(java.lang.String)


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.