@ Override public void serialize ( HttpServletResponse httpResponse ) throws IOException { httpResponse . setHeader ( HttpHeader . CACHE_CONTROL , HttpHeader . NO_CACHE ) ; httpResponse . addHeader ( HttpHeader . CACHE_CONTROL , HttpHeader . NO_STORE ) ; httpResponse . setHeader ( HttpHeader . PRAGMA , HttpHeader . NO_CACHE ) ; httpResponse . setDateHeader ( HttpHeader . EXPIRES , 0 ) ; httpResponse . setContentType ( getContentType ( ) . getValue ( ) ) ; serialize ( httpResponse . getOutputStream ( ) ) ; }
Set common HTTP response headers and delegates actual serialization to subclass . This method disables cache and set content type to value returned by subclass .