org.norther.tammi.spray.connector.chain
Class DispatchedResponse
java.lang.Object
javax.servlet.ServletResponseWrapper
org.norther.tammi.spray.filter.chain.ServletResponseWrapper
org.norther.tammi.spray.filter.chain.HttpServletResponseWrapper
org.norther.tammi.spray.connector.chain.DispatchedResponse
- All Implemented Interfaces:
- EventListener, HttpServletResponse, ServletResponse, Poolable, Recyclable, FilterChainListener
public class DispatchedResponse
- extends HttpServletResponseWrapper
A dispatched response providing about the same functionality as
ConnectorResponse
and hiding others to provide a fresh start
for includes.
- Version:
- $Id: DispatchedResponse.java,v 1.6 2009/09/28 15:08:27 cvsimp Exp $
- Author:
- Ilkka Priha
Fields inherited from interface javax.servlet.http.HttpServletResponse |
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DispatchedResponse
public DispatchedResponse(ServletResponse res)
throws IOException
- Contstructs a new decorator with a response.
- Parameters:
res
- the response to dispatch.
- Throws:
IOException
- on I/O errors.
dispose
public void dispose()
- Description copied from interface:
Recyclable
- Disposes the object after use. The method is called when the object is
returned to its pool. The dispose method must call its super.
- Specified by:
dispose
in interface Recyclable
- Overrides:
dispose
in class HttpServletResponseWrapper
setContentLength
public void setContentLength(int value)
- Specified by:
setContentLength
in interface ServletResponse
- Overrides:
setContentLength
in class ServletResponseWrapper
setContentType
public void setContentType(String type)
- Specified by:
setContentType
in interface ServletResponse
- Overrides:
setContentType
in class ServletResponseWrapper
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interface ServletResponse
- Overrides:
getCharacterEncoding
in class ServletResponseWrapper
setCharacterEncoding
public void setCharacterEncoding(String enc)
- Specified by:
setCharacterEncoding
in interface ServletResponse
- Overrides:
setCharacterEncoding
in class ServletResponseWrapper
setLocale
public void setLocale(Locale locale)
- Specified by:
setLocale
in interface ServletResponse
- Overrides:
setLocale
in class ServletResponseWrapper
getOutputStream
public ServletOutputStream getOutputStream()
throws IOException
- Specified by:
getOutputStream
in interface ServletResponse
- Overrides:
getOutputStream
in class ServletResponseWrapper
- Throws:
IOException
getWriter
public PrintWriter getWriter()
throws IOException
- Specified by:
getWriter
in interface ServletResponse
- Overrides:
getWriter
in class ServletResponseWrapper
- Throws:
IOException
isCommitted
public boolean isCommitted()
- Specified by:
isCommitted
in interface ServletResponse
- Overrides:
isCommitted
in class ServletResponseWrapper
reset
public void reset()
- Specified by:
reset
in interface ServletResponse
- Overrides:
reset
in class ServletResponseWrapper
resetBuffer
public void resetBuffer()
- Specified by:
resetBuffer
in interface ServletResponse
- Overrides:
resetBuffer
in class ServletResponseWrapper
flushBuffer
public void flushBuffer()
throws IOException
- Specified by:
flushBuffer
in interface ServletResponse
- Overrides:
flushBuffer
in class ServletResponseWrapper
- Throws:
IOException
getBufferSize
public int getBufferSize()
- Specified by:
getBufferSize
in interface ServletResponse
- Overrides:
getBufferSize
in class ServletResponseWrapper
setBufferSize
public void setBufferSize(int size)
- Specified by:
setBufferSize
in interface ServletResponse
- Overrides:
setBufferSize
in class ServletResponseWrapper
setStatus
public void setStatus(int code)
- Specified by:
setStatus
in interface HttpServletResponse
- Overrides:
setStatus
in class HttpServletResponseWrapper
addHeader
public void addHeader(String name,
String value)
- Specified by:
addHeader
in interface HttpServletResponse
- Overrides:
addHeader
in class HttpServletResponseWrapper
addIntHeader
public void addIntHeader(String name,
int value)
- Specified by:
addIntHeader
in interface HttpServletResponse
- Overrides:
addIntHeader
in class HttpServletResponseWrapper
addDateHeader
public void addDateHeader(String name,
long date)
- Specified by:
addDateHeader
in interface HttpServletResponse
- Overrides:
addDateHeader
in class HttpServletResponseWrapper
setHeader
public void setHeader(String name,
String value)
- Specified by:
setHeader
in interface HttpServletResponse
- Overrides:
setHeader
in class HttpServletResponseWrapper
setIntHeader
public void setIntHeader(String name,
int value)
- Specified by:
setIntHeader
in interface HttpServletResponse
- Overrides:
setIntHeader
in class HttpServletResponseWrapper
setDateHeader
public void setDateHeader(String name,
long date)
- Specified by:
setDateHeader
in interface HttpServletResponse
- Overrides:
setDateHeader
in class HttpServletResponseWrapper
addCookie
public void addCookie(Cookie cookie)
- Specified by:
addCookie
in interface HttpServletResponse
- Overrides:
addCookie
in class HttpServletResponseWrapper
sendError
public void sendError(int code)
throws IOException
- Specified by:
sendError
in interface HttpServletResponse
- Overrides:
sendError
in class HttpServletResponseWrapper
- Throws:
IOException
sendError
public void sendError(int code,
String msg)
throws IOException
- Specified by:
sendError
in interface HttpServletResponse
- Overrides:
sendError
in class HttpServletResponseWrapper
- Throws:
IOException
setStatus
public void setStatus(int code,
String sm)
- Specified by:
setStatus
in interface HttpServletResponse
- Overrides:
setStatus
in class HttpServletResponseWrapper
getRawOutputStream
protected OutputStream getRawOutputStream()
- Gets the raw output stream.
- Returns:
- the raw output stream or null.
Copyright © 2004 The Norther Organization. All rights reserved.