· Example of code highlight

xiaoxiao2021-03-06  43

/ *

* Copyright 2000-2004 The Apache Software Foundation.

*

* Licensed under the apache license, Version 2.0 (The "license");

* You May Not Use this file except in compliance with the license.

* You May Obtain a Copy of The License At

*

* http://www.apache.org/license/license-2.0

*

* Unless Required by Applicable Law Or Agreed To in Writing, Software

* Distributed Under the license is distributed on an "as is" Basis,

* WITHOUT WARRANTIES OR CONDitions of any Kind, Either Express Or Implied.

* See the license for the specific language governing permissions and

* Limitations under the license.

* /

Package org.apache.jetspeed.Engine;

Import javax.servlet.servletconfig;

Import org.apache.commons.configuration.configuration;

Import org.apache.comjetspeed.portalcontext;

Import org.apache.jetspeed.components.componentManager;

Import org.apache.comjetspeed.exception.jetspeedException;

Import org.apache.jetspeed.pipeline.pipeline;

Import org.apache.jetspeed.Request.RequestContext;

Import ORG.APache.pluto.portletContaineRexception;

/ **

* ENGINE Abstract - TO Run from Both Unit Tests and servlet

*

* @Author David Sean Taylor

* @version $ ID: Engine.Java, V 1.4 2004/03/08 00:26:46 Jford Exp $

* /

Public Interface Engine Extends JetSpeedengineConstants

{

/ **

* Initializes The Engine With A Commons Configuration, Starting All Early InITable Services.

*

* @Param configuration a commons configuration set

* @Param ApplicationRoot A String path to the application root for resources

* @Param config the servlet configuration, this parameter can Be null for unit tests or utilities * @throws jetspeedexception when the engine fails to initilialize

* /

Public Void Init (Configuration Configuration, String ApplicationRoot, ServletConfig Config)

Throws JetSpeedException;

/ **

* Initializes The Portlet Container Given a Servlet Configuration.

*

* @Param config the servlet configuration.

* @Throws portletContaineRexception When the Container Fails to Initialize.

* /

Public void Initcontainer (servletconfig config)

Throws portletcontainerexception;

/ **

* Shuts Down The Jetspeed Engine and All Associated Services

*

* @Throws JetSpeedException when Engine Fails to Shutdown

* /

Public void shutdown ()

Throws JetSpeedException;

/ **

* Makes a service request to the engine.

*

* @Param Context a RequestContext with the state of the request.

* @Throws JetSpeedException when the engine fails to inIntilialize

* /

Public void service (RequestContext Context)

Throws JetSpeedException;

/ **

* Gets The Engine's Request Default Pipeline.

*

* @Return Pipeline The Engine's Request Pipeline.

* /

Public pipeline getpipeline ();

/ **

* Gets The Specified Engine's Request Pipeline.

*

* @Return Pipeline a specific request pipeline.

* /

Public pipeline getpipeline (string pipelinename);

/ **

* Get the portal context associated with running thread of the engine

*

* @Return PortalContext Associated with this Engine's Thread

* /

Public portalcontext getContext ();

/ **

* Gets the real path to an application relative resource

*

* @Param Path The Application Relative Resource

* @Return String the real path to this resource * /

Public String GetRealPath (String Path);

/ **

* Get The Servlet Configuration IF this Engine is Running Under a servlet container.

*

* @Return Config The Servlet Configuration

* /

Public servletconfig getServletConfig ();

/ **

* Returns the the requestContext associated with the current

* thread. this can be accepted through throght Org.apache.jetspeed.jetspeed

* environment class.

* @Return RequestContext associated with the current thread.

* /

Public RequestContext getCurrentRequestContext ();

Public ComponentManager getComponentManager ();

}

转载请注明原文地址:https://www.9cbs.com/read-75050.html

New Post(0)