Interface CDORestResponse


public interface CDORestResponse
Minimal response operations needed by the REST engine. An adapter implements this interface over its HTTP server's response and remains responsible for the server-specific request lifecycle.
Author:
Eike Stepper
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the response body stream.
    boolean
    Indicates whether the transport has committed any response bytes.
    void
    setHeader(String name, String value)
    Sets a response header before response bytes are written.
    void
    setStatus(int status)
    Sets the HTTP status before response bytes are written.
  • Method Details

    • setStatus

      void setStatus(int status)
      Sets the HTTP status before response bytes are written.
      Parameters:
      status - the numeric HTTP status
    • setHeader

      void setHeader(String name, String value)
      Sets a response header before response bytes are written.
      Parameters:
      name - the header name
      value - the header value
    • getOutputStream

      OutputStream getOutputStream() throws IOException
      Returns the response body stream. The service flushes but does not close this stream.
      Returns:
      the transport-owned response body stream
      Throws:
      IOException
    • isCommitted

      boolean isCommitted()
      Indicates whether the transport has committed any response bytes. Once committed, the service will not attempt to append a Problem Details body after a serialization or transport failure.
      Returns:
      true if the response can no longer be replaced