Interface ResponseAdapter
- All Known Implementing Classes:
AbstractResponseAdapter
public interface ResponseAdapter
-
Method Summary
Modifier and TypeMethodDescriptionProvides a `PrintWriter` for writing content to the response.voidsetCharacterEncoding(String encoding) Sets the character encoding for the response.voidsetContentType(String contentType) Sets the content type of the response.voidSets a header on the response.voidsetStatus(int status) Sets the HTTP status code for the response.
-
Method Details
-
getWriter
Provides a `PrintWriter` for writing content to the response.- Returns:
- The `PrintWriter` for the response.
- Throws:
Exception- if the writer cannot be retrieved.
-
setHeader
Sets a header on the response.- Parameters:
name- The name of the header.value- The value of the header.
-
setContentType
Sets the content type of the response.- Parameters:
contentType- The MIME type of the response content.
-
setCharacterEncoding
Sets the character encoding for the response.- Parameters:
encoding- The character encoding to use.
-
setStatus
void setStatus(int status) Sets the HTTP status code for the response.- Parameters:
status- The HTTP status code.
-