Class AbstractResponseAdapter
java.lang.Object
starfederation.datastar.adapters.response.AbstractResponseAdapter
- All Implemented Interfaces:
ResponseAdapter
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.
-
Field Details
-
writer
-
-
Constructor Details
-
AbstractResponseAdapter
public AbstractResponseAdapter()
-
-
Method Details
-
getWriter
Description copied from interface:ResponseAdapterProvides a `PrintWriter` for writing content to the response.- Specified by:
getWriterin interfaceResponseAdapter- Returns:
- The `PrintWriter` for the response.
- Throws:
Exception- if the writer cannot be retrieved.
-
setHeader
Description copied from interface:ResponseAdapterSets a header on the response.- Specified by:
setHeaderin interfaceResponseAdapter- Parameters:
name- The name of the header.value- The value of the header.
-
setContentType
Description copied from interface:ResponseAdapterSets the content type of the response.- Specified by:
setContentTypein interfaceResponseAdapter- Parameters:
contentType- The MIME type of the response content.
-
setCharacterEncoding
Description copied from interface:ResponseAdapterSets the character encoding for the response.- Specified by:
setCharacterEncodingin interfaceResponseAdapter- Parameters:
encoding- The character encoding to use.
-
setStatus
public void setStatus(int status) Description copied from interface:ResponseAdapterSets the HTTP status code for the response.- Specified by:
setStatusin interfaceResponseAdapter- Parameters:
status- The HTTP status code.
-