Interface IInterceptorResponse

All Known Implementing Classes:
ServerServicesInterceptorResponseWrapper

public interface IInterceptorResponse
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addHeader(String name, String value)
    Adds a response header with the given name and value.
    void
    Forces any content in the buffer to be written to the client.
    Returns the name of the character encoding
    Returns a String that indicates the content-type of the response
    Returns the value of the specified request header as a String
    Gets the names of the headers of this response.
    Gets the values of the response header with the given name.
    jakarta.servlet.ServletOutputStream
    Returns a ServletOutputStream suitable for writing binary data in the response.
    Returns a PrintWriter object that can send character text to the client.
    boolean
    Returns a boolean indicating if the response has been committed.
    void
    Clears any data that exists in the buffer as well as the status code and headers.
    void
    sendError(int sc)
    Sends an error response to the client using the specified status code and clears the buffer.
    void
    sendError(int sc, String msg)
    Sends an error response to the client using the specified status code and clears the buffer.
    void
    Sets the character encoding of the response being sent to the client.
    void
    setHeader(String name, String value)
    Sets a response header with the given name and value.
    void
    setStatus(int sc)
    Sets the status code for this response.
  • Method Details

    • sendError

      void sendError(int sc, String msg) throws IOException
      Sends an error response to the client using the specified status code and clears the buffer.
      Parameters:
      sc - - the error status code
      msg - - the descriptive message
      Throws:
      IOException - If an input or output exception occurs
    • sendError

      void sendError(int sc) throws IOException
      Sends an error response to the client using the specified status code and clears the buffer.
      Parameters:
      sc - - the error status code
      Throws:
      IOException - If an input or output exception occurs
    • setHeader

      void setHeader(String name, String value)
      Sets a response header with the given name and value. If the header had already been set, the new value overwrites the previous one.
      Parameters:
      name - - the name of the header
      value - - the header value
    • addHeader

      void addHeader(String name, String value)
      Adds a response header with the given name and value.
      Parameters:
      name - - the name of the header
      value - - the additional header value
    • setStatus

      void setStatus(int sc)
      Sets the status code for this response.
      Parameters:
      sc - - the status code
    • getHeader

      Returns the value of the specified request header as a String
      Parameters:
      name - - the name of the response header whose value to return
      Returns:
      the value of the response header with the given name, or null if no header with the given name has been set on this response
    • getHeaders

      Gets the values of the response header with the given name.
      Parameters:
      name - - the name of the response header whose values to return
      Returns:
      a Collection of the values of the response header with the given name
    • getHeaderNames

      Gets the names of the headers of this response.
      Returns:
      a Collection of the names of the headers of this response
    • getOutputStream

      jakarta.servlet.ServletOutputStream getOutputStream() throws IOException
      Returns a ServletOutputStream suitable for writing binary data in the response.
      Returns:
      a ServletOutputStream for writing binary data
      Throws:
      IOException - if the getWriter method has been called on this response
    • getWriter

      Returns a PrintWriter object that can send character text to the client.
      Returns:
      a PrintWriter object that can return character data to the client
      Throws:
      IOException - if an input or output exception occurred
    • flushBuffer

      void flushBuffer() throws IOException
      Forces any content in the buffer to be written to the client. A call to this method automatically commits the response, meaning the status code and headers will be written.
      Throws:
      IOException
    • reset

      void reset()
      Clears any data that exists in the buffer as well as the status code and headers.
    • setCharacterEncoding

      Sets the character encoding of the response being sent to the client.
      Parameters:
      var1 - - a String specifying only the character
    • getCharacterEncoding

      Returns the name of the character encoding
    • isCommitted

      boolean isCommitted()
      Returns a boolean indicating if the response has been committed. A committed response has already had its status code and headers written.
      Returns:
      a boolean indicating if the response has been committed
    • getContentType

      Returns a String that indicates the content-type of the response
      Returns:
      String that indicates the content-type of the response