org.hippoecm.hst.core.component
Interface HstResponseState

All Known Implementing Classes:
AbstractHstResponseState, HstPortletResponseState, HstServletResponseState

public interface HstResponseState

Temporarily holds the current state of a HST response. Basically the response of each HstComponent is buffered and stored in a HstResponseState implementation. At the final stage, the HstComponent container will flush every buffered content by using this HstResponseState implementation. Therefore, this interface has all the similar methods which can be found in HttpServletResponse or PortletResponse to keep the contents buffered.

Version:
$Id: HstResponseState.java 29295 2011-08-03 19:06:46Z jbloemendal $

Method Summary
 void addCookie(javax.servlet.http.Cookie cookie)
           
 void addDateHeader(String name, long date)
           
 void addHeadElement(Element element, String keyHint)
           
 void addHeader(String name, String value)
           
 void addIntHeader(String name, int value)
           
 void addPreambleNode(Comment comment)
           
 void clear()
           
 boolean containsHeadElement(String keyHint)
           
 boolean containsHeader(String name)
           
 Comment createComment(String comment)
           
 Element createElement(String tagName)
           
 void flush()
           
 void flushBuffer()
           
 void forward(String pathInfo)
           
 int getBufferSize()
           
 String getCharacterEncoding()
           
 String getContentType()
           
 int getErrorCode()
           
 String getErrorMessage()
           
 String getForwardPathInfo()
           
 List<Element> getHeadElements()
           
 Locale getLocale()
           
 javax.servlet.ServletOutputStream getOutputStream()
           
 String getRedirectLocation()
           
 Element getWrapperElement()
           
 PrintWriter getWriter()
           
 boolean isActionResponse()
           
 boolean isCommitted()
           
 boolean isMimeResponse()
           
 boolean isRenderResponse()
           
 boolean isResourceResponse()
           
 boolean isStateAwareResponse()
           
 void reset()
           
 void resetBuffer()
           
 void sendError(int errorCode)
           
 void sendError(int errorCode, String errorMessage)
           
 void sendRedirect(String redirectLocation)
           
 void setBufferSize(int size)
           
 void setCharacterEncoding(String charset)
           
 void setContentLength(int len)
           
 void setContentType(String type)
           
 void setDateHeader(String name, long date)
           
 void setHeader(String name, String value)
           
 void setIntHeader(String name, int value)
           
 void setLocale(Locale locale)
           
 void setStatus(int statusCode)
           
 void setStatus(int statusCode, String message)
           
 void setWrapperElement(Element element)
           
 

Method Detail

isActionResponse

boolean isActionResponse()

isRenderResponse

boolean isRenderResponse()

isResourceResponse

boolean isResourceResponse()

isMimeResponse

boolean isMimeResponse()

isStateAwareResponse

boolean isStateAwareResponse()

addCookie

void addCookie(javax.servlet.http.Cookie cookie)

addDateHeader

void addDateHeader(String name,
                   long date)

addHeader

void addHeader(String name,
               String value)

addIntHeader

void addIntHeader(String name,
                  int value)

containsHeader

boolean containsHeader(String name)

sendError

void sendError(int errorCode,
               String errorMessage)
               throws IOException
Throws:
IOException

sendError

void sendError(int errorCode)
               throws IOException
Throws:
IOException

getErrorCode

int getErrorCode()

getErrorMessage

String getErrorMessage()

sendRedirect

void sendRedirect(String redirectLocation)
                  throws IOException
Throws:
IOException

getRedirectLocation

String getRedirectLocation()

forward

void forward(String pathInfo)
             throws IOException
Throws:
IOException

getForwardPathInfo

String getForwardPathInfo()

setDateHeader

void setDateHeader(String name,
                   long date)

setHeader

void setHeader(String name,
               String value)

setIntHeader

void setIntHeader(String name,
                  int value)

setStatus

void setStatus(int statusCode,
               String message)

setStatus

void setStatus(int statusCode)

flushBuffer

void flushBuffer()
                 throws IOException
Throws:
IOException

getBufferSize

int getBufferSize()

getCharacterEncoding

String getCharacterEncoding()

getContentType

String getContentType()

getLocale

Locale getLocale()

getOutputStream

javax.servlet.ServletOutputStream getOutputStream()
                                                  throws IOException
Throws:
IOException

getWriter

PrintWriter getWriter()
                      throws IOException
Throws:
IOException

isCommitted

boolean isCommitted()

reset

void reset()

resetBuffer

void resetBuffer()

setBufferSize

void setBufferSize(int size)

setCharacterEncoding

void setCharacterEncoding(String charset)

setContentLength

void setContentLength(int len)

setContentType

void setContentType(String type)

setLocale

void setLocale(Locale locale)

createComment

Comment createComment(String comment)

createElement

Element createElement(String tagName)

addHeadElement

void addHeadElement(Element element,
                    String keyHint)

getHeadElements

List<Element> getHeadElements()

containsHeadElement

boolean containsHeadElement(String keyHint)

addPreambleNode

void addPreambleNode(Comment comment)

setWrapperElement

void setWrapperElement(Element element)

getWrapperElement

Element getWrapperElement()

clear

void clear()

flush

void flush()
           throws IOException
Throws:
IOException


Copyright © 2008-2012 Hippo. All Rights Reserved.