Class AnnotatedJsonMessageWriter

java.lang.Object
com.emc.documentum.rest.wire.RestBindingConfigAware
com.emc.documentum.rest.wire.json.AnnotatedJsonMessageWriter
All Implemented Interfaces:
StreamingMessageWriter

public class AnnotatedJsonMessageWriter extends RestBindingConfigAware implements StreamingMessageWriter
An implementation of StreamingMessageWriter which writes the JSON message from the annotated model instance.
  • Constructor Details

    • AnnotatedJsonMessageWriter

      public AnnotatedJsonMessageWriter()
      Default constructor.
    • AnnotatedJsonMessageWriter

      public AnnotatedJsonMessageWriter(com.emc.documentum.rest.config.BindingConfig bindingConfig)
      Constructor with a custom binding configuration.
      Parameters:
      bindingConfig - the binding configuration.
  • Method Details

    • write

      public void write(Object t, OutputStream outputStream) throws IOException
      Write the model to message output stream.
      Specified by:
      write in interface StreamingMessageWriter
      Parameters:
      t - the model instance
      outputStream - the message output stream
      Throws:
      IOException - when there are errors in writing the object
    • write

      public void write(Object t, OutputStream outputStream, org.springframework.http.MediaType contentType) throws IOException
      Write the model to message output stream
      Specified by:
      write in interface StreamingMessageWriter
      Parameters:
      t - the model instance
      outputStream - the message output stream
      contentType - the content type of the output message
      Throws:
      IOException - when there are errors in writing the object