org.apache.cocoon.environment.background
Class BackgroundEnvironment

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.environment.AbstractEnvironment
          extended byorg.apache.cocoon.environment.background.BackgroundEnvironment
All Implemented Interfaces:
Environment, LogEnabled

public class BackgroundEnvironment
extends AbstractEnvironment

A simple implementation of org.apache.cocoon.environment.Environment for pipeline calls which are not externally triggered.

Since:
2.1.4
Version:
CVS $Id: BackgroundEnvironment.java 47058 2004-09-22 16:02:25Z vgritsenko $
Author:
Reinhard Poetz

Field Summary
 
Fields inherited from class org.apache.cocoon.environment.AbstractEnvironment
action, objectModel, outputStream, prefix, secureOutputStream, uri, view
 
Constructor Summary
BackgroundEnvironment(Logger logger, Context ctx)
           
BackgroundEnvironment(String uri, String view, File context, OutputStream stream, Logger logger)
           
 
Method Summary
 String getContentType()
          Get the content type of the resource
 boolean isExternal()
          Always return false
 void redirect(String newURL, boolean global, boolean permanent)
          Redirect to the given URL
 void setContentLength(int length)
          Set the length of the generated content
 void setContentType(String mimeType)
          Set the content type of the generated resource
 
Methods inherited from class org.apache.cocoon.environment.AbstractEnvironment
commitResponse, extractAction, extractView, finishingProcessing, getAction, getAttribute, getAttributeNames, getObjectModel, getOutputStream, getURI, getURIPrefix, getView, isInternalRedirect, isResponseModified, removeAttribute, setAction, setAttribute, setResponseIsNotModified, setStatus, setURI, setView, startingProcessing, tryResetResponse
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackgroundEnvironment

public BackgroundEnvironment(Logger logger,
                             Context ctx)

BackgroundEnvironment

public BackgroundEnvironment(String uri,
                             String view,
                             File context,
                             OutputStream stream,
                             Logger logger)
Parameters:
uri -
view -
context -
stream -
logger -
Method Detail

redirect

public void redirect(String newURL,
                     boolean global,
                     boolean permanent)
              throws IOException
Description copied from interface: Environment
Redirect to the given URL

Throws:
IOException

setContentType

public void setContentType(String mimeType)
Description copied from interface: Environment
Set the content type of the generated resource

See Also:
Environment.setContentType(java.lang.String)

getContentType

public String getContentType()
Description copied from interface: Environment
Get the content type of the resource

See Also:
Environment.getContentType()

setContentLength

public void setContentLength(int length)
Description copied from interface: Environment
Set the length of the generated content

See Also:
Environment.setContentLength(int)

isExternal

public boolean isExternal()
Always return false

Returns:
true if this environment is external
See Also:
Environment.isExternal()


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