org.apache.jetspeed.engine
Class JetspeedEngine

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

public class JetspeedEngine
extends java.lang.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
protected  java.lang.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_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, java.lang.String applicationRoot, javax.servlet.ServletConfig config, ComponentManager componentManager)
           
JetspeedEngine(PortalConfiguration configuration, java.lang.String applicationRoot, javax.servlet.ServletConfig config, ComponentManager componentManager)
           
 
Method Summary
 ComponentManager getComponentManager()
           
 org.apache.pluto.services.ContainerService getContainerService(java.lang.Class service)
           getContainerService
 PortalContext getContext()
          Returns the context associated with this engine.
 RequestContext getCurrentRequestContext()
          Returns the the RequestContext associated with the current thread.
 org.apache.pluto.factory.Factory getFactory(java.lang.Class theClass)
           getFactory
 Pipeline getPipeline()
          Gets the engine's request default pipeline.
 Pipeline getPipeline(java.lang.String pipelineName)
          Gets the specified engine's request pipeline.
 java.lang.String getRealPath(java.lang.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(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

log

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

defaultPipelineName

protected java.lang.String defaultPipelineName
Constructor Detail

JetspeedEngine

public JetspeedEngine(org.apache.commons.configuration.Configuration configuration,
                      java.lang.String applicationRoot,
                      javax.servlet.ServletConfig config,
                      ComponentManager componentManager)

JetspeedEngine

public JetspeedEngine(PortalConfiguration configuration,
                      java.lang.String applicationRoot,
                      javax.servlet.ServletConfig config,
                      ComponentManager componentManager)
Method Detail

start

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

Specified by:
start in interface Engine
Parameters:
configuration - a commons Configuration set
applicationRoot - a String path to the application root for resources
-
Throws:
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 JetspeedException
Description copied from interface: Engine
Shuts down the Jetspeed engine and all associated services

Specified by:
shutdown in interface Engine
Throws:
JetspeedException - when the engine fails to shutdown

service

public void service(RequestContext context)
             throws 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:
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 java.lang.String getRealPath(java.lang.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(java.lang.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 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 ComponentManager getComponentManager()
Specified by:
getComponentManager in interface Engine

getFactory

public org.apache.pluto.factory.Factory getFactory(java.lang.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(java.lang.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-2010 Apache Software Foundation. All Rights Reserved.