Interface ResponseWriter<T>

Type Parameters:
T - the entity type
All Superinterfaces:
Component<ResponseWriterKey>, Keyed<ResponseWriterKey>
All Known Implementing Classes:
AbstractResponseWriter, EXIResponseWriter, JSONResponseWriter, SoapChainResponseWriter, XmlResponseWriter

public interface ResponseWriter<T> extends Component<ResponseWriterKey>
TODO JavaDoc
Since:
1.0.0
  • Method Details

    • getContentType

      MediaType getContentType()
      Get the current contentType
      Returns:
      the contenType
    • setContentType

      void setContentType(MediaType contentType)
      Set the contentType
      Parameters:
      contentType - to set
    • isSetContentType

      default boolean isSetContentType()
      Check if contentType is set
      Returns:
      true, if contentType is set
    • write

      void write(T t, OutputStream out, ResponseProxy responseProxy) throws IOException, EncodingException
      Write object t to OutputStream out
      Parameters:
      t - Object to write
      out - OutputStream to be written to
      responseProxy - ResponseProxy giving access to header and content length setters
      Throws:
      IOException - If an error occurs during writing
      EncodingException - if an errors occurs during encoding
    • write

      void write(T t, OutputStream out) throws IOException, EncodingException
      Write object t to OutputStream out
      Parameters:
      t - Object to write
      out - OutputStream to be written to
      Throws:
      IOException - If an error occurs during writing
      EncodingException - if an errors occurs during encoding
    • supportsGZip

      boolean supportsGZip(T t)
      Check if GZip is supported by this writer
      Parameters:
      t - Object to write
      Returns:
      true, if GZip is supported
    • getEncodedContentType

      default MediaType getEncodedContentType(ResponseFormat responseFormat)
    • hasForcedHttpStatus

      default boolean hasForcedHttpStatus(T t)
    • getForcedHttpStatus

      default HTTPStatus getForcedHttpStatus(T t)