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 Summary
ConstructorDescriptionDefault constructor.AnnotatedJsonMessageWriter
(com.emc.documentum.rest.config.BindingConfig bindingConfig) Constructor with a custom binding configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(Object t, OutputStream outputStream) Write the model to message output stream.void
write
(Object t, OutputStream outputStream, org.springframework.http.MediaType contentType) Write the model to message output streamMethods inherited from class com.emc.documentum.rest.wire.RestBindingConfigAware
getBindingConfig
-
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
Write the model to message output stream.- Specified by:
write
in interfaceStreamingMessageWriter
- Parameters:
t
- the model instanceoutputStream
- 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 interfaceStreamingMessageWriter
- Parameters:
t
- the model instanceoutputStream
- the message output streamcontentType
- the content type of the output message- Throws:
IOException
- when there are errors in writing the object
-