Interface SlingHttpServletResponseResult

All Superinterfaces:
Adaptable, HttpServletResponse, ServletResponse, SlingHttpServletResponse

@ProviderType public interface SlingHttpServletResponseResult extends SlingHttpServletResponse

This is an extension of a SlingHttpServletResponse to get the result from a processing operation.

Note: instances of this interface are not thread-safe.

Since:
1.0 (Sling API Bundle 2.24.0)
  • Method Details

    • getContentLength

      long getContentLength()
      Gets the content length
      Returns:
      the content length or -1 if not set
    • getStatusMessage

      @Nullable @Nullable String getStatusMessage()
      Gets the status message
      Returns:
      the status message or null.
    • getCookie

      @Nullable @Nullable Cookie getCookie(String name)
      Gets the named cookie.
      Parameters:
      name - the name of the cookie
      Returns:
      the cookie or null if no cookie with that name exists
    • getCookies

      @Nullable @Nullable Cookie[] getCookies()
      Gets all cookies.
      Returns:
      the array of cookies or null if no cookies were set
    • getOutput

      byte[] getOutput()
      Gets the output as a byte array.
      Returns:
      the output as a byte array
    • getOutputAsString

      @NotNull @NotNull String getOutputAsString()
      Gets the output as a string.
      Returns:
      the output as a string