Package org.apache.catalina
Interface HttpResponse
-
- All Superinterfaces:
Response
- All Known Implementing Classes:
DummyResponse
,HttpResponseWrapper
,PECoyoteResponse
,Response
public interface HttpResponse extends Response
An HttpResponse is the Catalina-internal facade for anHttpServletResponse
that is to be produced, based on the processing of a correspondingHttpRequest
.- Version:
- $Revision: 1.2 $ $Date: 2005/12/08 01:27:16 $
- Author:
- Craig R. McClanahan
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addSessionCookieInternal(jakarta.servlet.http.Cookie cookie)
Special method for adding a session cookie as we should be overriding any previousString
getHeader(String name)
Return the value for the specified header, ornull
if this header has not been set.Collection<String>
getHeaderNames()
Collection<String>
getHeaders(String name)
String
getMessage()
Return the error message that was set withsendError()
for this Response.int
getStatus()
Return the HTTP status code associated with this Response.void
reset(int status, String message)
Reset this response, and specify the values for the HTTP status code and corresponding message.void
sendAcknowledgement()
Send an acknowledgment of a request.-
Methods inherited from interface org.apache.catalina.Response
createOutputStream, encode, finishResponse, getConnector, getContentCount, getContentLength, getContentType, getContext, getDetailMessage, getIncluded, getInfo, getReporter, getRequest, getResponse, getStream, isAppCommitted, isError, isSuspended, recycle, resetBuffer, resetBuffer, setAppCommitted, setConnector, setContext, setDetailMessage, setError, setIncluded, setRequest, setStream, setSuspended
-
-
-
-
Method Detail
-
getHeader
String getHeader(String name)
Return the value for the specified header, ornull
if this header has not been set. If more than one value was added for this name, only the first is returned; usegetHeaders(String)
to retrieve all of them.- Parameters:
name
- Header name to look up
-
getHeaderNames
Collection<String> getHeaderNames()
- Returns:
- a (possibly empty)
Collection
of the names of the headers of this response
-
getHeaders
Collection<String> getHeaders(String name)
- Parameters:
name
- the name of the response header whose values to return- Returns:
- a (possibly empty)
Collection
of the values of the response header with the given name
-
addSessionCookieInternal
void addSessionCookieInternal(jakarta.servlet.http.Cookie cookie)
Special method for adding a session cookie as we should be overriding any previous- Parameters:
cookie
-
-
getMessage
String getMessage()
Return the error message that was set withsendError()
for this Response.
-
getStatus
int getStatus()
Return the HTTP status code associated with this Response.
-
reset
void reset(int status, String message)
Reset this response, and specify the values for the HTTP status code and corresponding message.- Throws:
IllegalStateException
- if this response has already been committed
-
sendAcknowledgement
void sendAcknowledgement() throws IOException
Send an acknowledgment of a request. An acknowledgment in this case is simply an HTTP response status line, i.e.HTTP/1.1 [STATUS] [REASON-PHRASE]
.
- Specified by:
sendAcknowledgement
in interfaceResponse
- Throws:
IOException
- if an input/output error occurs
-
-