org.apache.cocoon.environment.background
Class BackgroundEnvironment

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

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.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Reinhard Poetz

Field Summary
 
Fields inherited from class org.apache.cocoon.environment.AbstractEnvironment
action, avalonToCocoonSourceWrapper, context, initializedComponents, manager, objectModel, outputStream, prefix, rootContext, secureOutputStream, sourceResolver, uris, view
 
Fields inherited from interface org.apache.excalibur.source.SourceResolver
METHOD, ROLE, URI_ENCODING, URI_PARAMETERS
 
Constructor Summary
BackgroundEnvironment(Logger logger, Context ctx)
           
BackgroundEnvironment(String uri, String view, File context, OutputStream stream, Logger log)
           
 
Method Summary
 String getContentType()
          Get the content type of the resource
 boolean isExternal()
          Always return false
 void redirect(boolean sessionmode, String newURL)
          Redirect the client 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
changeContext, commitResponse, extractAction, extractView, finishingProcessing, getAction, getAttribute, getAttributeNames, getContext, getObjectModel, getOutputStream, getOutputStream, getRootContext, getURI, getURIPrefix, getView, globalRedirect, hasAttribute, initComponents, isInternalRedirect, isResponseModified, release, removeAttribute, resolve, resolveURI, resolveURI, setAction, setAttribute, setContext, setContext, setResponseIsNotModified, setStatus, setURIPrefix, 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)
                      throws MalformedURLException
Throws:
MalformedURLException

BackgroundEnvironment

public BackgroundEnvironment(String uri,
                             String view,
                             File context,
                             OutputStream stream,
                             Logger log)
                      throws MalformedURLException
Parameters:
uri -
view -
context -
stream -
log -
Throws:
MalformedURLException
Method Detail

redirect

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

Throws:
IOException
See Also:
Environment.redirect(boolean, java.lang.String)

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-2010 The Apache Software Foundation. All Rights Reserved.