org.hippoecm.hst.core.component
Class AbstractHstResponseState
java.lang.Object
org.hippoecm.hst.core.component.AbstractHstResponseState
- All Implemented Interfaces:
- HstResponseState
- Direct Known Subclasses:
- HstPortletResponseState, HstServletResponseState
public abstract class AbstractHstResponseState
- extends Object
- implements HstResponseState
Temporarily holds the current state of a HST response
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)
|
protected abstract void |
addResponseCookie(javax.servlet.http.Cookie cookie)
|
protected abstract void |
addResponseHeadElement(Element element,
String keyHint)
|
protected abstract void |
addResponseHeader(String name,
String value)
|
void |
clear()
|
boolean |
containsHeadElement(String keyHint)
|
boolean |
containsHeader(String name)
|
Comment |
createComment(String comment)
|
protected void |
failIfCommitted()
|
void |
flush()
|
void |
flushBuffer()
|
void |
forward(String pathInfo)
|
protected List<String> |
getAddedHeaderList(String name,
boolean create)
|
int |
getBufferSize()
|
String |
getCharacterEncoding()
|
String |
getContentType()
|
int |
getErrorCode()
|
String |
getErrorMessage()
|
String |
getForwardPathInfo()
|
List<Element> |
getHeadElements()
|
Locale |
getLocale()
|
javax.servlet.ServletOutputStream |
getOutputStream()
|
String |
getRedirectLocation()
|
protected abstract OutputStream |
getResponseOutputStream()
|
protected abstract PrintWriter |
getResponseWriter()
|
protected List<String> |
getSetHeaderList(String name,
boolean create)
|
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)
|
protected abstract void |
setResponseCharacterEncoding(String characterEncoding)
|
protected abstract void |
setResponseContentLength(int len)
|
protected abstract void |
setResponseContentType(String contentType)
|
protected abstract void |
setResponseHeader(String name,
String value)
|
protected abstract void |
setResponseLocale(Locale locale)
|
protected abstract void |
setResponseStatus(int status)
|
void |
setStatus(int statusCode)
|
void |
setStatus(int statusCode,
String message)
|
void |
setWrapperElement(Element element)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isActionResponse
protected boolean isActionResponse
isRenderResponse
protected boolean isRenderResponse
isResourceResponse
protected boolean isResourceResponse
isMimeResponse
protected boolean isMimeResponse
isStateAwareResponse
protected boolean isStateAwareResponse
defaultLocale
protected Locale defaultLocale
flushed
protected boolean flushed
byteOutputBuffer
protected ByteArrayOutputStream byteOutputBuffer
charOutputBuffer
protected org.hippoecm.hst.core.component.AbstractHstResponseState.CharArrayWriterBuffer charOutputBuffer
outputStream
protected javax.servlet.ServletOutputStream outputStream
printWriter
protected PrintWriter printWriter
addedHeaders
protected Map<String,List<String>> addedHeaders
setHeaders
protected Map<String,List<String>> setHeaders
cookies
protected List<javax.servlet.http.Cookie> cookies
headElements
protected List<KeyValue<String,Element>> headElements
preambleNodes
protected List<Comment> preambleNodes
wrapperElement
protected Element wrapperElement
committed
protected boolean committed
hasStatus
protected boolean hasStatus
hasError
protected boolean hasError
locale
protected Locale locale
setContentTypeAfterEncoding
protected boolean setContentTypeAfterEncoding
closed
protected boolean closed
characterEncoding
protected String characterEncoding
contentLength
protected int contentLength
contentType
protected String contentType
errorCode
protected int errorCode
errorMessage
protected String errorMessage
statusCode
protected int statusCode
AbstractHstResponseState
public AbstractHstResponseState(Object request,
Object response)
getAddedHeaderList
protected List<String> getAddedHeaderList(String name,
boolean create)
getSetHeaderList
protected List<String> getSetHeaderList(String name,
boolean create)
failIfCommitted
protected void failIfCommitted()
isActionResponse
public boolean isActionResponse()
- Specified by:
isActionResponse
in interface HstResponseState
isRenderResponse
public boolean isRenderResponse()
- Specified by:
isRenderResponse
in interface HstResponseState
isResourceResponse
public boolean isResourceResponse()
- Specified by:
isResourceResponse
in interface HstResponseState
isMimeResponse
public boolean isMimeResponse()
- Specified by:
isMimeResponse
in interface HstResponseState
isStateAwareResponse
public boolean isStateAwareResponse()
- Specified by:
isStateAwareResponse
in interface HstResponseState
addCookie
public void addCookie(javax.servlet.http.Cookie cookie)
- Specified by:
addCookie
in interface HstResponseState
addDateHeader
public void addDateHeader(String name,
long date)
- Specified by:
addDateHeader
in interface HstResponseState
addHeader
public void addHeader(String name,
String value)
- Specified by:
addHeader
in interface HstResponseState
addIntHeader
public void addIntHeader(String name,
int value)
- Specified by:
addIntHeader
in interface HstResponseState
containsHeader
public boolean containsHeader(String name)
- Specified by:
containsHeader
in interface HstResponseState
sendError
public void sendError(int errorCode,
String errorMessage)
throws IOException
- Specified by:
sendError
in interface HstResponseState
- Throws:
IOException
sendError
public void sendError(int errorCode)
throws IOException
- Specified by:
sendError
in interface HstResponseState
- Throws:
IOException
getErrorCode
public int getErrorCode()
- Specified by:
getErrorCode
in interface HstResponseState
getErrorMessage
public String getErrorMessage()
- Specified by:
getErrorMessage
in interface HstResponseState
sendRedirect
public void sendRedirect(String redirectLocation)
throws IOException
- Specified by:
sendRedirect
in interface HstResponseState
- Throws:
IOException
getRedirectLocation
public String getRedirectLocation()
- Specified by:
getRedirectLocation
in interface HstResponseState
forward
public void forward(String pathInfo)
throws IOException
- Specified by:
forward
in interface HstResponseState
- Throws:
IOException
getForwardPathInfo
public String getForwardPathInfo()
- Specified by:
getForwardPathInfo
in interface HstResponseState
setDateHeader
public void setDateHeader(String name,
long date)
- Specified by:
setDateHeader
in interface HstResponseState
setHeader
public void setHeader(String name,
String value)
- Specified by:
setHeader
in interface HstResponseState
setIntHeader
public void setIntHeader(String name,
int value)
- Specified by:
setIntHeader
in interface HstResponseState
setStatus
public void setStatus(int statusCode,
String message)
- Specified by:
setStatus
in interface HstResponseState
setStatus
public void setStatus(int statusCode)
- Specified by:
setStatus
in interface HstResponseState
flushBuffer
public void flushBuffer()
throws IOException
- Specified by:
flushBuffer
in interface HstResponseState
- Throws:
IOException
getBufferSize
public int getBufferSize()
- Specified by:
getBufferSize
in interface HstResponseState
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interface HstResponseState
getContentType
public String getContentType()
- Specified by:
getContentType
in interface HstResponseState
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interface HstResponseState
getOutputStream
public javax.servlet.ServletOutputStream getOutputStream()
throws IOException
- Specified by:
getOutputStream
in interface HstResponseState
- Throws:
IOException
getWriter
public PrintWriter getWriter()
throws IOException
- Specified by:
getWriter
in interface HstResponseState
- Throws:
IOException
isCommitted
public boolean isCommitted()
- Specified by:
isCommitted
in interface HstResponseState
reset
public void reset()
- Specified by:
reset
in interface HstResponseState
resetBuffer
public void resetBuffer()
- Specified by:
resetBuffer
in interface HstResponseState
setBufferSize
public void setBufferSize(int size)
- Specified by:
setBufferSize
in interface HstResponseState
setCharacterEncoding
public void setCharacterEncoding(String charset)
- Specified by:
setCharacterEncoding
in interface HstResponseState
setContentLength
public void setContentLength(int len)
- Specified by:
setContentLength
in interface HstResponseState
setContentType
public void setContentType(String type)
- Specified by:
setContentType
in interface HstResponseState
setLocale
public void setLocale(Locale locale)
- Specified by:
setLocale
in interface HstResponseState
addHeadElement
public void addHeadElement(Element element,
String keyHint)
- Specified by:
addHeadElement
in interface HstResponseState
containsHeadElement
public boolean containsHeadElement(String keyHint)
- Specified by:
containsHeadElement
in interface HstResponseState
getHeadElements
public List<Element> getHeadElements()
- Specified by:
getHeadElements
in interface HstResponseState
addPreambleNode
public void addPreambleNode(Comment comment)
- Specified by:
addPreambleNode
in interface HstResponseState
setWrapperElement
public void setWrapperElement(Element element)
- Specified by:
setWrapperElement
in interface HstResponseState
getWrapperElement
public Element getWrapperElement()
- Specified by:
getWrapperElement
in interface HstResponseState
clear
public void clear()
- Specified by:
clear
in interface HstResponseState
flush
public void flush()
throws IOException
- Specified by:
flush
in interface HstResponseState
- Throws:
IOException
createComment
public Comment createComment(String comment)
- Specified by:
createComment
in interface HstResponseState
setResponseLocale
protected abstract void setResponseLocale(Locale locale)
addResponseCookie
protected abstract void addResponseCookie(javax.servlet.http.Cookie cookie)
setResponseCharacterEncoding
protected abstract void setResponseCharacterEncoding(String characterEncoding)
setResponseContentType
protected abstract void setResponseContentType(String contentType)
addResponseHeader
protected abstract void addResponseHeader(String name,
String value)
setResponseHeader
protected abstract void setResponseHeader(String name,
String value)
addResponseHeadElement
protected abstract void addResponseHeadElement(Element element,
String keyHint)
setResponseStatus
protected abstract void setResponseStatus(int status)
setResponseContentLength
protected abstract void setResponseContentLength(int len)
getResponseOutputStream
protected abstract OutputStream getResponseOutputStream()
throws IOException
- Throws:
IOException
getResponseWriter
protected abstract PrintWriter getResponseWriter()
throws IOException
- Throws:
IOException
Copyright © 2008-2012 Hippo. All Rights Reserved.