|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.ServletResponseWrapper
org.norther.tammi.spray.filter.chain.ServletResponseWrapper
org.norther.tammi.spray.filter.chain.HttpServletResponseWrapper
org.norther.tammi.spray.protocol.chain.AbstractProtocolResponse
public abstract class AbstractProtocolResponse
An abstract protocol response implementing extended character encoding.
| Field Summary | |
|---|---|
protected static String |
SERVER_ID
The server id attribute. |
protected StringBuilder |
sharedBuffer
A string buffer for parsing. |
| Constructor Summary | |
|---|---|
AbstractProtocolResponse()
Constructs a new response. |
|
AbstractProtocolResponse(ServletResponse res)
Constructs a new response with a wrapped one. |
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes the object after use. |
protected String |
encodeURL(String url,
boolean redirected)
Encodes the specified URL with the identifiers from the request. |
String |
getCharacterEncoding()
|
protected int |
getContentLength()
Gets the content length. |
String |
getContentType()
|
protected HttpFilter |
getHttpFilter()
Gets the HTTP filter. |
protected abstract boolean |
isWriterInUse()
Checks whether a writer is already in use. |
void |
reset()
|
void |
setCharacterEncoding(String enc)
|
void |
setContentLength(int value)
|
void |
setContentType(String type)
|
void |
setLocale(Locale locale)
|
void |
setStatus(int code)
|
| Methods inherited from class org.norther.tammi.spray.filter.chain.HttpServletResponseWrapper |
|---|
addCookie, addDateHeader, addHeader, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, sendError, sendError, sendRedirect, setDateHeader, setHeader, setIntHeader, setResponse, setStatus |
| Methods inherited from class org.norther.tammi.spray.filter.chain.ServletResponseWrapper |
|---|
completed, disposed, filtered, getExtension, getFilterChain, getFilteredRequest, getFilteredResponse, isDisposed, recycle, recycle, recycled |
| Methods inherited from class javax.servlet.ServletResponseWrapper |
|---|
flushBuffer, getBufferSize, getLocale, getOutputStream, getResponse, getWriter, isCommitted, resetBuffer, setBufferSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.servlet.ServletResponse |
|---|
flushBuffer, getBufferSize, getLocale, getOutputStream, getWriter, isCommitted, resetBuffer, setBufferSize |
| Field Detail |
|---|
protected static final String SERVER_ID
protected StringBuilder sharedBuffer
| Constructor Detail |
|---|
public AbstractProtocolResponse()
public AbstractProtocolResponse(ServletResponse res)
res - the wrapped response.| Method Detail |
|---|
public void dispose()
Recyclable
dispose in interface Recyclabledispose in class HttpServletResponseWrapperpublic void setStatus(int code)
setStatus in interface HttpServletResponsesetStatus in class HttpServletResponseWrapperpublic void setContentLength(int value)
setContentLength in interface ServletResponsesetContentLength in class ServletResponseWrapperpublic String getContentType()
getContentType in interface ServletResponsegetContentType in class ServletResponseWrapperpublic void setContentType(String type)
setContentType in interface ServletResponsesetContentType in class ServletResponseWrapperpublic String getCharacterEncoding()
getCharacterEncoding in interface ServletResponsegetCharacterEncoding in class ServletResponseWrapperpublic void setCharacterEncoding(String enc)
setCharacterEncoding in interface ServletResponsesetCharacterEncoding in class ServletResponseWrapperpublic void setLocale(Locale locale)
setLocale in interface ServletResponsesetLocale in class ServletResponseWrapperpublic void reset()
reset in interface ServletResponsereset in class ServletResponseWrapperprotected int getContentLength()
protected String encodeURL(String url,
boolean redirected)
url - URL to be encoded.redirected - a flag for redirection.
protected HttpFilter getHttpFilter()
IllegalStateException - if not available.protected abstract boolean isWriterInUse()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||