|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.environment.AbstractEnvironment
org.apache.cocoon.environment.http.HttpEnvironment
public class HttpEnvironment
HTTP Servlet environment.
| Field Summary | |
|---|---|
static String |
HTTP_REQUEST_OBJECT
|
static String |
HTTP_RESPONSE_OBJECT
|
static String |
HTTP_SERVLET_CONTEXT
|
| 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 | |
|---|---|
HttpEnvironment(String uri,
String root,
HttpServletRequest req,
HttpServletResponse res,
ServletContext servletContext,
HttpContext context,
String containerEncoding,
String defaultFormEncoding)
Constructs a HttpEnvironment object from a HttpServletRequest and HttpServletResponse objects |
|
| Method Summary | |
|---|---|
String |
getContentType()
Get the ContentType |
OutputStream |
getOutputStream(int bufferSize)
Get the output stream where to write the generated resource. |
boolean |
hasRedirected()
Was one of the redirection methods called ? |
boolean |
isExternal()
Always return true. |
boolean |
isResponseModified(long lastModified)
Check if the response has been modified since the same "resource" was requested. |
void |
permanentRedirect(boolean sessionmode,
String newURL)
Redirect to the given URL |
void |
redirect(boolean sessionmode,
String newURL)
Redirect to the given URL |
void |
sendStatus(int sc)
Send a content-less response with the given status code. |
void |
setContentLength(int length)
Set the length of the generated content |
void |
setContentType(String contentType)
Set the ContentType |
void |
setResponseIsNotModified()
Mark the response as not modified. |
void |
setStatus(int statusCode)
Set the StatusCode |
boolean |
tryResetResponse()
Reset the response if possible. |
| Methods inherited from class org.apache.cocoon.environment.AbstractEnvironment |
|---|
changeContext, commitResponse, extractAction, extractView, finishingProcessing, getAction, getAttribute, getAttributeNames, getContext, getObjectModel, getOutputStream, getRootContext, getURI, getURIPrefix, getView, globalRedirect, hasAttribute, initComponents, isInternalRedirect, release, removeAttribute, resolve, resolveURI, resolveURI, setAction, setAttribute, setContext, setContext, setURIPrefix, setView, startingProcessing |
| 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 |
| Methods inherited from interface org.apache.cocoon.environment.Redirector |
|---|
globalRedirect |
| Field Detail |
|---|
public static final String HTTP_REQUEST_OBJECT
public static final String HTTP_RESPONSE_OBJECT
public static final String HTTP_SERVLET_CONTEXT
| Constructor Detail |
|---|
public HttpEnvironment(String uri,
String root,
HttpServletRequest req,
HttpServletResponse res,
ServletContext servletContext,
HttpContext context,
String containerEncoding,
String defaultFormEncoding)
throws MalformedURLException,
IOException
MalformedURLException
IOException| Method Detail |
|---|
public void redirect(boolean sessionmode,
String newURL)
throws IOException
Redirector
redirect in interface Environmentredirect in interface RedirectorIOException
public void permanentRedirect(boolean sessionmode,
String newURL)
throws IOException
PermanentRedirector
permanentRedirect in interface PermanentRedirectorIOExceptionpublic void sendStatus(int sc)
Redirector
sendStatus in interface Redirectorsc - an http status code.public boolean hasRedirected()
Redirector
hasRedirected in interface Redirectorpublic void setStatus(int statusCode)
setStatus in interface EnvironmentsetStatus in class AbstractEnvironmentpublic void setContentType(String contentType)
setContentType in interface Environmentpublic String getContentType()
getContentType in interface Environmentpublic void setContentLength(int length)
setContentLength in interface Environmentpublic boolean isResponseModified(long lastModified)
isResponseModified in interface EnvironmentisResponseModified in class AbstractEnvironmentpublic void setResponseIsNotModified()
setResponseIsNotModified in interface EnvironmentsetResponseIsNotModified in class AbstractEnvironment
public boolean tryResetResponse()
throws IOException
tryResetResponse in interface EnvironmenttryResetResponse in class AbstractEnvironmentIOException
public OutputStream getOutputStream(int bufferSize)
throws IOException
AbstractEnvironment.getOutputStream().
getOutputStream in interface EnvironmentgetOutputStream in class AbstractEnvironmentIOExceptionpublic boolean isExternal()
true.
isExternal in interface Environment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||