public interface Response
ServletResponse
that is to be produced,
based on the processing of a corresponding Request
.Modifier and Type | Method and Description |
---|---|
javax.servlet.ServletOutputStream |
createOutputStream()
Create and return a ServletOutputStream to write the content
associated with this Response.
|
String |
encode(String url)
Apply URL Encoding to the given URL without adding session identifier
et al associated to this response.
|
void |
finishResponse()
Perform whatever actions are required to flush and close the output
stream or writer, in a single operation.
|
Connector |
getConnector()
Return the Connector through which this Response is returned.
|
int |
getContentCount()
Return the number of bytes actually written to the output stream.
|
int |
getContentLength()
Return the content length that was set or calculated for this Response.
|
String |
getContentType()
Return the content type that was set or calculated for this response,
or
null if no content type was set. |
Context |
getContext()
Return the Context with which this Response is associated.
|
String |
getDetailMessage()
Gets detail error message.
|
boolean |
getIncluded()
Return the "processing inside an include" flag.
|
String |
getInfo()
Return descriptive information about this Response implementation and
the corresponding version number, in the format
<description>/<version> . |
PrintWriter |
getReporter()
Return a PrintWriter that can be used to render error messages,
regardless of whether a stream or writer has already been acquired.
|
Request |
getRequest()
Return the Request with which this Response is associated.
|
javax.servlet.ServletResponse |
getResponse()
Return the
ServletResponse for which this object
is the facade. |
OutputStream |
getStream()
Return the output stream associated with this Response.
|
boolean |
isAppCommitted()
Application commit flag accessor.
|
boolean |
isError()
Error flag accessor.
|
boolean |
isSuspended()
Suspended flag accessor.
|
void |
recycle()
Release all object references, and initialize instance variables, in
preparation for reuse of this object.
|
void |
resetBuffer()
Reset the data buffer but not any status or header information.
|
void |
resetBuffer(boolean resetWriterStreamFlags)
Reset the data buffer and the using Writer/Stream flags but not any
status or header information.
|
void |
sendAcknowledgement()
Send an acknowledgment of a request.
|
void |
setAppCommitted(boolean appCommitted)
Set the application commit flag.
|
void |
setConnector(Connector connector)
Set the Connector through which this Response is returned.
|
void |
setContext(Context context)
Set the Context with which this Response is associated.
|
void |
setDetailMessage(String message)
Sets detail error message.
|
void |
setError()
Set the error flag.
|
void |
setIncluded(boolean included)
Set the "processing inside an include" flag.
|
void |
setRequest(Request request)
Set the Request with which this Response is associated.
|
void |
setStream(OutputStream stream)
Set the output stream associated with this Response.
|
void |
setSuspended(boolean suspended)
Set the suspended flag.
|
Connector getConnector()
void setConnector(Connector connector)
connector
- The new connectorint getContentCount()
Context getContext()
void setContext(Context context)
context
- The associated Contextvoid setAppCommitted(boolean appCommitted)
appCommitted
- The new application committed flag valueboolean isAppCommitted()
boolean getIncluded()
void setIncluded(boolean included)
included
- true
if we are currently inside a
RequestDispatcher.include(), else false
String getInfo()
<description>/<version>
.Request getRequest()
void setRequest(Request request)
request
- The new associated requestjavax.servlet.ServletResponse getResponse()
ServletResponse
for which this object
is the facade.OutputStream getStream()
void setStream(OutputStream stream)
stream
- The new output streamvoid setSuspended(boolean suspended)
suspended
- The new suspended flag valueboolean isSuspended()
void setError()
boolean isError()
void setDetailMessage(String message)
message
- detail error messageString getDetailMessage()
javax.servlet.ServletOutputStream createOutputStream() throws IOException
IOException
- if an input/output error occursvoid finishResponse() throws IOException
IOException
- if an input/output error occursint getContentLength()
String getContentType()
null
if no content type was set.PrintWriter getReporter() throws IOException
IOException
- if an input/output error occursvoid recycle()
void resetBuffer()
void resetBuffer(boolean resetWriterStreamFlags)
void sendAcknowledgement() throws IOException
IOException
- if an input/output error occursCopyright © 2020. All rights reserved.