Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.enterprise.control.ajax
Class ResponseHandler

    java.lang.Object
      org.deegree.enterprise.control.ajax.ResponseHandler

    public class ResponseHandler

extends Object

Author:
  Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
`ResponseHandler(javax.servlet.http.HttpServletResponse response)`

Method Summary
`javax.servlet.http.HttpServletResponse` | `getHttpServletResponse()`
`void` | `setContentLength(int length)` sets content length
`void` | `setContentType(String contentType)` sets content type
`void` | `setLocale(Locale locale)` sets locale/character encoding
`(package private) void` | `setXSLT(XSLTDocument xslt)` sets an xslt script that will be used if a XML document will be written; - `writeAndClose(XMLFragment)`
`void` | `writeAndClose(boolean emitClassName, Object value)` 'text/plain; charset=utf-8' will be used as default if no content-type has been set.
`void` | `writeAndClose(String value)` write a string result back to the client and closes the output stream.
`void` | `writeAndClose(XMLFragment value)` write a XML result back to the client (if a xslt script has been set the document will be transformed first) and closes the output stream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResponseHandler

    ResponseHandler(javax.servlet.http.HttpServletResponse response)

Parameters:
  `response` -

Method Detail

### setContentType

    public void setContentType(String contentType)

  sets content type

  Parameters:
    `contentType` -

### setLocale

    public void setLocale(Locale locale)

  sets locale/character encoding

  Parameters:
    `locale` -

### setContentLength

    public void setContentLength(int length)

  sets content length

  Parameters:
    `length` -

### setXSLT

    void setXSLT(XSLTDocument xslt)

  sets an xslt script that will be used if a XML document will be written; - `writeAndClose(XMLFragment)`

  Parameters:
    `xslt` -

### writeAndClose

    public void writeAndClose(String value)
                       throws IOException

  write a string result back to the client and closes the output stream. 'text/plain; charset=utf-8' will be used as default if no content-type has been set.

  Parameters:
    `value` -
  Throws:
    `IOException`

### writeAndClose

    public void writeAndClose(XMLFragment value)
                       throws IOException

  write a XML result back to the client (if a xslt script has been set the document will be transformed first) and closes the output stream.
  'text/plain; charset=utf-8' will be used as default if no content-type has been set.

  Parameters:
    `value` -
  Throws:
    `IOException`

### writeAndClose

    public void writeAndClose(boolean emitClassName,
                              Object value)
                       throws IOException

  'text/plain; charset=utf-8' will be used as default if no content-type has been set.

  Parameters:
    `emitClassName` -
    `value` -
  Throws:
    `IOException`

### getHttpServletResponse

    public javax.servlet.http.HttpServletResponse getHttpServletResponse()

  Returns:
    original HttpServletResponse object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org