FileDocCategorySizeDatePackage
Response.javaAPI DocGlassfish v2 API7831Fri May 04 22:31:52 BST 2007org.apache.catalina

Response

public interface Response
A Response is the Catalina-internal facade for a ServletResponse that is to be produced, based on the processing of a corresponding Request.
author
Craig R. McClanahan
version
$Revision: 1.3 $ $Date: 2007/05/05 05:31:51 $

Fields Summary
Constructors Summary
Methods Summary
public javax.servlet.ServletOutputStreamcreateOutputStream()
Create and return a ServletOutputStream to write the content associated with this Response.

exception
IOException if an input/output error occurs

public voidfinishResponse()
Perform whatever actions are required to flush and close the output stream or writer, in a single operation.

exception
IOException if an input/output error occurs

public ConnectorgetConnector()
Return the Connector through which this Response is returned.

public intgetContentCount()
Return the number of bytes actually written to the output stream.

public intgetContentLength()
Return the content length that was set or calculated for this Response.

public java.lang.StringgetContentType()
Return the content type that was set or calculated for this response, or null if no content type was set.

public ContextgetContext()
Return the Context with which this Response is associated.

public java.lang.StringgetDetailMessage()
Gets detail error message.

return
the detail error message

public booleangetIncluded()
Return the "processing inside an include" flag.

public java.lang.StringgetInfo()
Return descriptive information about this Response implementation and the corresponding version number, in the format <description>/<version>.

public java.io.PrintWritergetReporter()
Return a PrintWriter that can be used to render error messages, regardless of whether a stream or writer has already been acquired.

return
Writer which can be used for error reports. If the response is not an error report returned using sendError or triggered by an unexpected exception thrown during the servlet processing (and only in that case), null will be returned if the response stream has already been used.
exception
IOException if an input/output error occurs

public RequestgetRequest()
Return the Request with which this Response is associated.

public javax.servlet.ServletResponsegetResponse()
Return the ServletResponse for which this object is the facade.

public java.io.OutputStreamgetStream()
Return the output stream associated with this Response.

public booleanisAppCommitted()
Application commit flag accessor.

public booleanisError()
Error flag accessor.

public booleanisSuspended()
Suspended flag accessor.

public voidrecycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object.

public voidresetBuffer()
Reset the data buffer but not any status or header information.

public voidsendAcknowledgement()
Send an acknowledgment of a request.

exception
IOException if an input/output error occurs

public voidsetAppCommitted(boolean appCommitted)
Set the application commit flag.

param
appCommitted The new application committed flag value

public voidsetConnector(Connector connector)
Set the Connector through which this Response is returned.

param
connector The new connector

public voidsetContext(Context context)
Set the Context with which this Response is associated. This should be called as soon as the appropriate Context is identified.

param
context The associated Context

public voidsetDetailMessage(java.lang.String message)
Sets detail error message.

param
message detail error message

public voidsetError()
Set the error flag.

public voidsetIncluded(boolean included)
Set the "processing inside an include" flag.

param
included true if we are currently inside a RequestDispatcher.include(), else false

public voidsetRequest(Request request)
Set the Request with which this Response is associated.

param
request The new associated request

public voidsetStream(java.io.OutputStream stream)
Set the output stream associated with this Response.

param
stream The new output stream

public voidsetSuspended(boolean suspended)
Set the suspended flag.

param
suspended The new suspended flag value