com.creamtec.ajaxswing.core

## Class HttpResponseData

- java.lang.Object
- - com.creamtec.ajaxswing.core.HttpResponseData

- All Implemented Interfaces:
    java.io.Serializable

      public class HttpResponseData
      extends java.lang.Object
      implements java.io.Serializable

  Contains response parameters, that are sent back to the servlet from the client agent.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `STATUS_ERROR`
    `static int` | `STATUS_EXIT`
    `static int` | `STATUS_INTERNAL_REDIRECT`
    `static int` | `STATUS_OK`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpResponseData()`
    `HttpResponseData(int status)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getErrorMessage()` Returns the error message
    `java.lang.String` | `getHtmlPage()` In AJAX mode (default) this method returns JSON array of page updates For full page refreshes it returns the HTML page, that needs to be sent to the browser
    `byte[]` | `getHtmlPageBytes()`
    `java.util.HashMap` | `getParams()` Stores AjaxSwing and custom parameters of the response.
    `java.lang.String` | `getRedirectURL()` Returns the URL of the page, that was requested to be shown next
    `int` | `getStatus()` Returns the status of the response
    `java.lang.String` | `getSubmitURL()` Returns the error message
    `void` | `setErrorMessage(java.lang.String message)` Sets the error message
    `void` | `setHtmlPage(java.lang.String htmlPage)` Sets HTMl page or JSON string with updates that should be written to the response
    `void` | `setHtmlPageBytes(byte[] htmlPageBytes)`
    `void` | `setRedirectURL(java.lang.String url)` Sets the URL of the page, that was requested to be shown next
    `void` | `setStatus(int status)`
    `void` | `setSubmitURL(java.lang.String url)` Sets the error message

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### STATUS_OK

          public static final int STATUS_OK

      See Also:
        Constant Field Values

    - #### STATUS_ERROR

          public static final int STATUS_ERROR

      See Also:
        Constant Field Values

    - #### STATUS_EXIT

          public static final int STATUS_EXIT

      See Also:
        Constant Field Values

    - #### STATUS_INTERNAL_REDIRECT

          public static final int STATUS_INTERNAL_REDIRECT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HttpResponseData

          public HttpResponseData()

    - #### HttpResponseData

          public HttpResponseData(int status)

  - ### Method Detail

    - #### getHtmlPage

          public java.lang.String getHtmlPage()
                                       throws java.io.UnsupportedEncodingException

      In AJAX mode (default) this method returns JSON array of page updates For full page refreshes it returns the HTML page, that needs to be sent to the browser
      Throws:
        `java.io.UnsupportedEncodingException`

    - #### setHtmlPage

          public void setHtmlPage(java.lang.String htmlPage)

      Sets HTMl page or JSON string with updates that should be written to the response

    - #### getStatus

          public int getStatus()

      Returns the status of the response

    - #### getRedirectURL

          public java.lang.String getRedirectURL()

      Returns the URL of the page, that was requested to be shown next

    - #### setRedirectURL

          public void setRedirectURL(java.lang.String url)

      Sets the URL of the page, that was requested to be shown next

    - #### getErrorMessage

          public java.lang.String getErrorMessage()

      Returns the error message

    - #### setErrorMessage

          public void setErrorMessage(java.lang.String message)

      Sets the error message

    - #### getSubmitURL

          public java.lang.String getSubmitURL()

      Returns the error message

    - #### setSubmitURL

          public void setSubmitURL(java.lang.String url)

      Sets the error message

    - #### setStatus

          public void setStatus(int status)

    - #### getParams

          public java.util.HashMap getParams()

      Stores AjaxSwing and custom parameters of the response. Custom parameters placed into this map should have keys beginning with "custom."
      Returns:
        HashMap

    - #### getHtmlPageBytes

          public byte[] getHtmlPageBytes()

    - #### setHtmlPageBytes

          public void setHtmlPageBytes(byte[] htmlPageBytes)

Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.