org.apache.jetspeed.engine
Class JetspeedEngine

java.lang.Object
  extended byorg.apache.jetspeed.engine.JetspeedEngine
All Implemented Interfaces:
org.apache.pluto.services.ContainerService, Engine, org.apache.pluto.services.factory.FactoryManagerService, org.apache.jetspeed.engine.JetspeedEngineConstants, org.apache.pluto.services.PortletContainerEnvironment

public class JetspeedEngine
extends Object
implements Engine

AbstractEngine

Version:
$Id: AbstractEngine.java 188433 2005-03-23 22:50:44Z ate $
Author:
David Sean Taylor , Scott T. Weaver

Field Summary
private  String applicationRoot
           
private  org.apache.jetspeed.components.ComponentManager componentManager
           
private  javax.servlet.ServletConfig config
           
private  org.apache.commons.configuration.Configuration configuration
           
private static org.apache.commons.logging.Log console
           
private  PortalContext context
           
protected  String defaultPipelineName
           
protected static org.apache.commons.logging.Log log
           
 
Fields inherited from interface org.apache.jetspeed.engine.JetspeedEngineConstants
APPLICATION_ROOT_DEFAULT, APPLICATION_ROOT_KEY, CONFIG_NAMESPACE, CONSOLE_LOGGER, DEFAULT_LOGGER, JETSPEED_CONFIGURATION_DEFAULT, JETSPEED_CONFIGURATION_KEY, JETSPEED_PROPERTIES_DEFAULT, JETSPEED_PROPERTIES_KEY, LOG4J_CONFIG_FILE, LOG4J_CONFIG_FILE_DEFAULT, LOGGING_ROOT, LOGGING_ROOT_DEFAULT, MAIL_SERVER_KEY, PIPELINE_CLASS, PIPELINE_DEFAULT, PIPELINE_DIRECTORY, PREFERENCES_FACTORY, PREFERENCES_FACTORY_DEFAULT, SCHEDULER_LOG_FACILITY, WEB_CONTEXT, WEBAPP_ROOT_KEY
 
Constructor Summary
JetspeedEngine(org.apache.commons.configuration.Configuration configuration, String applicationRoot, javax.servlet.ServletConfig config, org.apache.jetspeed.components.ComponentManager componentManager)
           
 
Method Summary
 org.apache.jetspeed.components.ComponentManager getComponentManager()
           
 org.apache.pluto.services.ContainerService getContainerService(Class service)
           getContainerService
 PortalContext getContext()
          Returns the context associated with this engine.
 org.apache.jetspeed.request.RequestContext getCurrentRequestContext()
          Returns the the RequestContext associated with the current thread.
 org.apache.pluto.factory.Factory getFactory(Class theClass)
           getFactory
 Pipeline getPipeline()
          Gets the engine's request default pipeline.
 Pipeline getPipeline(String pipelineName)
          Gets the specified engine's request pipeline.
 String getRealPath(String path)
          Given a application relative path, returns the real path relative to the application root
 javax.servlet.ServletConfig getServletConfig()
          Get the servlet configuration if this engine is running under a servlet container.
 void service(org.apache.jetspeed.request.RequestContext context)
          Makes a service request to the engine.
 void shutdown()
          Shuts down the Jetspeed engine and all associated services
 void start()
          Initializes the engine with a commons configuration, starting all early initable services.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

private final PortalContext context

config

private final javax.servlet.ServletConfig config

componentManager

private final org.apache.jetspeed.components.ComponentManager componentManager

configuration

private final org.apache.commons.configuration.Configuration configuration

applicationRoot

private final String applicationRoot

log

protected static final org.apache.commons.logging.Log log

console

private static final org.apache.commons.logging.Log console

defaultPipelineName

protected String defaultPipelineName
Constructor Detail

JetspeedEngine

public JetspeedEngine(org.apache.commons.configuration.Configuration configuration,
                      String applicationRoot,
                      javax.servlet.ServletConfig config,
                      org.apache.jetspeed.components.ComponentManager componentManager)
Method Detail

start

public void start()
           throws org.apache.jetspeed.exception.JetspeedException
Initializes the engine with a commons configuration, starting all early initable services.

Specified by:
start in interface Engine
Throws:
org.apache.jetspeed.exception.JetspeedException - when the engine fails to initilialize

getServletConfig

public javax.servlet.ServletConfig getServletConfig()
Get the servlet configuration if this engine is running under a servlet container.

Specified by:
getServletConfig in interface Engine
Returns:
config The servlet configuration

shutdown

public void shutdown()
              throws org.apache.jetspeed.exception.JetspeedException
Description copied from interface: Engine
Shuts down the Jetspeed engine and all associated services

Specified by:
shutdown in interface Engine
Throws:
org.apache.jetspeed.exception.JetspeedException - when the engine fails to shutdown

service

public void service(org.apache.jetspeed.request.RequestContext context)
             throws org.apache.jetspeed.exception.JetspeedException
Description copied from interface: Engine
Makes a service request to the engine.

Specified by:
service in interface Engine
Parameters:
context - a RequestContext with the state of the request.
Throws:
org.apache.jetspeed.exception.JetspeedException - when the engine fails to initilialize

getContext

public PortalContext getContext()
Returns the context associated with this engine.

Specified by:
getContext in interface Engine
Returns:
an EngineContext associated with this engine

getRealPath

public String getRealPath(String path)
Given a application relative path, returns the real path relative to the application root

Specified by:
getRealPath in interface Engine
Parameters:
path - The application relative resource
Returns:
String The real path to that resource

getPipeline

public Pipeline getPipeline(String pipelineName)
Description copied from interface: Engine
Gets the specified engine's request pipeline.

Specified by:
getPipeline in interface Engine
Returns:
Pipeline A specific request pipeline.

getPipeline

public Pipeline getPipeline()
Description copied from interface: Engine
Gets the engine's request default pipeline.

Specified by:
getPipeline in interface Engine
Returns:
Pipeline The engine's request pipeline.

getCurrentRequestContext

public org.apache.jetspeed.request.RequestContext getCurrentRequestContext()
Description copied from interface: Engine
Returns the the RequestContext associated with the current thread. This can be accessed throught org.apache.jetspeed.Jetspeed environment class.

Specified by:
getCurrentRequestContext in interface Engine
Returns:
RequestContext associated with the current thread.
See Also:
Engine.getCurrentRequestContext()

getComponentManager

public org.apache.jetspeed.components.ComponentManager getComponentManager()
Specified by:
getComponentManager in interface Engine

getFactory

public org.apache.pluto.factory.Factory getFactory(Class theClass)

getFactory

Specified by:
getFactory in interface org.apache.pluto.services.factory.FactoryManagerService
Parameters:
theClass -
Returns:
See Also:
FactoryManagerService.getFactory(java.lang.Class)

getContainerService

public org.apache.pluto.services.ContainerService getContainerService(Class service)

getContainerService

Specified by:
getContainerService in interface org.apache.pluto.services.PortletContainerEnvironment
Parameters:
service -
Returns:
See Also:
PortletContainerEnvironment.getContainerService(java.lang.Class)


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