Interface IServletResponse

    • Method Detail

      • getValue

        String getValue()
        The plain-text data of the response, used only when getType() is not set to a binary response type or redirect.
        Returns:
        The plain-text content of the HTTP response.
      • getContentType

        String getContentType()
        Applies only when getType() is set to EResponseType.SHOW_FILE:

        Must return the content type (=mime type) that is to be sent along with the binary data. When this is either null or blank, an attempt is made to guess the content type from the binary data. Please note that this may fail to determine the actual content type, you should always provide a content type.

        Returns:
        The content type of the binary data.
        Since:
        5.0
      • getSessionAttributes

        Map<String,​Serializable> getSessionAttributes()
        Returns:
        A Map with attributes that should be written to the HttpSession. Existing values in the HttpSession are overwritten.
        Since:
        5.0
      • getHttpHeader

        default Map<String,​String> getHttpHeader()
        Returns:
        A Map of HTTP headers that should be sent along with the HTTP response.
      • getHttpStatusCode

        default int getHttpStatusCode()
        Returns:
        The HTTP status code of the HTTP response.
      • getType

        EResponseType getType()
        Returns:
        The type of response, such as whether a plain text or binary file should be returned, or a redirect should be performed.
      • getBinValue

        byte[] getBinValue()
        The binary data for the response. Applies only when getType() is set to EResponseType.SHOW_FILE.
        Returns:
        The binary content of the HTTP response.
      • isForceDownload

        boolean isForceDownload()
        Applies only when getType() is set to EResponseType.SHOW_FILE.
        Returns:
        If true, attempts to prevent browsers from showing the binary content inline. If false, the browser may show the content inline, which is useful for PDF, image or plain text files. Please note that support for this differs between browsers.
      • getLongValue

        default long getLongValue()
        Returns an long value. If EResponseType.FORM_RECORD is set, this is the id of the record.
        Returns:
        an long value