Class AnnotatedXmlMessageReader

java.lang.Object
com.emc.documentum.rest.wire.RestBindingConfigAware
com.emc.documentum.rest.wire.xml.AnnotatedXmlMessageReader
All Implemented Interfaces:
StreamingMessageReader

public class AnnotatedXmlMessageReader extends RestBindingConfigAware implements StreamingMessageReader
An implementation of StreamingMessageReader which reads the XML message and parse it as the annotated model instance.
  • Constructor Details

    • AnnotatedXmlMessageReader

      public AnnotatedXmlMessageReader()
      Default constructor.
    • AnnotatedXmlMessageReader

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

    • read

      public <T, R extends T> R read(Class<? extends T> clazz, InputStream inputStream) throws IOException
      Read the message input stream and return it as a model instance.
      Specified by:
      read in interface StreamingMessageReader
      Type Parameters:
      T - the model class type
      R - the actual model instance type
      Parameters:
      clazz - the model class with annotation SerializableType
      inputStream - the message input stream
      Returns:
      the model instance
      Throws:
      IOException - when there are errors in reading the message