Module io.jstach.opt.spring.webmvc
Package io.jstach.opt.spring.webmvc
Class ServletJStachioHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<Object>
io.jstach.opt.spring.web.JStachioHttpMessageConverter
io.jstach.opt.spring.webmvc.ServletJStachioHttpMessageConverter
- All Implemented Interfaces:
- HttpMessageConverter<Object>
A servlet server aware 
JStachioHttpMessageConverter that will leverage
 ServletResponse.setBufferSize(int) to reduce duplicate buffering.- Author:
- agentgt
- 
Field SummaryFields inherited from class io.jstach.opt.spring.web.JStachioHttpMessageConverterbufferLimit, DEFAULT_BUFFER_LIMIT, DEFAULT_MEDIA_TYPEFields inherited from class org.springframework.http.converter.AbstractHttpMessageConverterlogger
- 
Constructor SummaryConstructorsConstructorDescriptionServletJStachioHttpMessageConverter(JStachio jstachio, MediaType mediaType, int bufferLimit) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected Output.CloseableEncodedOutput<IOException>createOutput(jakarta.servlet.http.HttpServletResponse response) Create the output from a servlet response.protected Output.CloseableEncodedOutput<IOException>createOutput(HttpOutputMessage message) Create the buffered output to use when executing JStachio.Methods inherited from class io.jstach.opt.spring.web.JStachioHttpMessageConvertercanRead, readInternal, supports, writeInternalMethods inherited from class org.springframework.http.converter.AbstractHttpMessageConverteraddDefaultHeaders, canRead, canWrite, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, setSupportedMediaTypes, supportsRepeatableWrites, writeMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.http.converter.HttpMessageConvertergetSupportedMediaTypes
- 
Constructor Details- 
ServletJStachioHttpMessageConverter- Parameters:
- jstachio- not null.
- mediaType- used for setContentType
- bufferLimit- limit used if the response is not a- ServletServerHttpResponse.
 
 
- 
- 
Method Details- 
createOutputDescription copied from class:JStachioHttpMessageConverterCreate the buffered output to use when executing JStachio.- Overrides:
- createOutputin class- JStachioHttpMessageConverter
- Parameters:
- message- response.
- Returns:
- the output ready for writing to.
- See Also:
 
- 
createOutputprotected Output.CloseableEncodedOutput<IOException> createOutput(jakarta.servlet.http.HttpServletResponse response) Create the output from a servlet response.- Parameters:
- response- servlet response
- Returns:
- closeable output.
 
 
-