com.uwyn.rife.servlet
Class HttpResponse

java.lang.Object
  extended by com.uwyn.rife.engine.AbstractResponse
      extended by com.uwyn.rife.servlet.HttpResponse
All Implemented Interfaces:
Response

public class HttpResponse
extends AbstractResponse


Constructor Summary
HttpResponse(Request request, HttpServletResponse response, boolean embedded)
           
 
Method Summary
protected  String _getCharacterEncoding()
          This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour.
protected  OutputStream _getOutputStream()
          This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour.
protected  void _sendRedirect(String location)
          This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour.
protected  void _setContentLength(int length)
          This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour.
protected  void _setContentType(String contentType)
          This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour.
 void addCookie(Cookie cookie)
          See HttpServletResponse.addCookie(Cookie).
 void addDateHeader(String name, long date)
          See HttpServletResponse.addDateHeader(String, long).
 void addHeader(String name, String value)
          See HttpServletResponse.addHeader(String, String).
 void addIntHeader(String name, int integer)
          See HttpServletResponse.addIntHeader(String, int).
 boolean containsHeader(String name)
          See HttpServletResponse.containsHeader(String).
 Response createEmbeddedResponse(String valueId, String differentiator)
          Creates a new Response instance that will be used for embedded elements.
 String encodeURL(String url)
          See HttpServletResponse.encodeURL(String).
 HttpServletResponse getHttpServletResponse()
          Retrieves the underlying HttpServletResponse.
 Locale getLocale()
          See ServletResponse.getLocale().
 PrintWriter getWriter()
          See ServletResponse.getWriter().
 void sendError(int statusCode)
          See HttpServletResponse.sendError(int).
 void sendError(int statusCode, String message)
          See HttpServletResponse.sendError(int, String).
 void setDateHeader(String name, long date)
          See HttpServletResponse.setDateHeader(String, long).
 void setHeader(String name, String value)
          See HttpServletResponse.setHeader(String, String).
 void setIntHeader(String name, int value)
          See HttpServletResponse.setIntHeader(String, int).
 void setLocale(Locale locale)
          See ServletResponse.setLocale(Locale).
 void setStatus(int statusCode)
          See HttpServletResponse.setStatus(int).
 
Methods inherited from class com.uwyn.rife.engine.AbstractResponse
clearBuffer, close, enableTextBuffer, flush, getCharacterEncoding, getContentType, getEmbeddedContent, getLastElement, getOutputStream, getRequest, isContentTypeSet, isEmbedded, isTextBufferEnabled, print, print, print, sendRedirect, setContentLength, setContentType, setLastElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpResponse

public HttpResponse(Request request,
                    HttpServletResponse response,
                    boolean embedded)
Method Detail

_setContentType

protected void _setContentType(String contentType)
Description copied from class: AbstractResponse
This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour. It behaves exactly like its counter-part in the Response interface.

Specified by:
_setContentType in class AbstractResponse
See Also:
Response.setContentType(String)

_getCharacterEncoding

protected String _getCharacterEncoding()
Description copied from class: AbstractResponse
This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour. It behaves exactly like its counter-part in the Response interface.

Specified by:
_getCharacterEncoding in class AbstractResponse
See Also:
Response.getCharacterEncoding()

_setContentLength

protected void _setContentLength(int length)
Description copied from class: AbstractResponse
This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour. It behaves exactly like its counter-part in the Response interface.

Specified by:
_setContentLength in class AbstractResponse
See Also:
Response.setContentLength(int)

_sendRedirect

protected void _sendRedirect(String location)
Description copied from class: AbstractResponse
This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour. It behaves exactly like its counter-part in the Response interface.

Specified by:
_sendRedirect in class AbstractResponse
See Also:
Response.sendRedirect(String)

_getOutputStream

protected OutputStream _getOutputStream()
                                 throws IOException
Description copied from class: AbstractResponse
This method needs to be implemented by the extending back-end class and will be called by AbstractResponse during the RIFE-specific additional behaviour. It behaves exactly like its counter-part in the Request interface.

Specified by:
_getOutputStream in class AbstractResponse
Throws:
IOException
See Also:
Response.getOutputStream()

createEmbeddedResponse

public Response createEmbeddedResponse(String valueId,
                                       String differentiator)
Description copied from interface: Response
Creates a new Response instance that will be used for embedded elements.

Parameters:
valueId - the template value in which the embedded element will be processed
differentiator - the embedded element differentiator
Returns:
the new Response instance for embedded use

addCookie

public void addCookie(Cookie cookie)
Description copied from interface: Response
See HttpServletResponse.addCookie(Cookie).


addHeader

public void addHeader(String name,
                      String value)
Description copied from interface: Response
See HttpServletResponse.addHeader(String, String).


addDateHeader

public void addDateHeader(String name,
                          long date)
Description copied from interface: Response
See HttpServletResponse.addDateHeader(String, long).


addIntHeader

public void addIntHeader(String name,
                         int integer)
Description copied from interface: Response
See HttpServletResponse.addIntHeader(String, int).


containsHeader

public boolean containsHeader(String name)
Description copied from interface: Response
See HttpServletResponse.containsHeader(String).


sendError

public void sendError(int statusCode)
               throws EngineException
Description copied from interface: Response
See HttpServletResponse.sendError(int).

Throws:
EngineException

sendError

public void sendError(int statusCode,
                      String message)
               throws EngineException
Description copied from interface: Response
See HttpServletResponse.sendError(int, String).

Throws:
EngineException

setDateHeader

public void setDateHeader(String name,
                          long date)
Description copied from interface: Response
See HttpServletResponse.setDateHeader(String, long).


setHeader

public void setHeader(String name,
                      String value)
Description copied from interface: Response
See HttpServletResponse.setHeader(String, String).


setIntHeader

public void setIntHeader(String name,
                         int value)
Description copied from interface: Response
See HttpServletResponse.setIntHeader(String, int).


setStatus

public void setStatus(int statusCode)
Description copied from interface: Response
See HttpServletResponse.setStatus(int).


encodeURL

public String encodeURL(String url)
Description copied from interface: Response
See HttpServletResponse.encodeURL(String).


setLocale

public void setLocale(Locale locale)
Description copied from interface: Response
See ServletResponse.setLocale(Locale).


getLocale

public Locale getLocale()
Description copied from interface: Response
See ServletResponse.getLocale().


getWriter

public PrintWriter getWriter()
                      throws IOException
Description copied from interface: Response
See ServletResponse.getWriter().

Throws:
IOException

getHttpServletResponse

public HttpServletResponse getHttpServletResponse()
Description copied from interface: Response
Retrieves the underlying HttpServletResponse.

Returns:
the underlying HttpServletResponse instance; or

null if this response isn't backed by HttpServletResponse



Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.