Class ObjectMapperPayloadWriter
java.lang.Object
dev.getelements.elements.rt.jackson.ObjectMapperPayloadWriter
- All Implemented Interfaces:
PayloadWriter
Uses an instance of
ObjectMapper to deserialize the payload from the OutputStream.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.ObjectMappervoidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) voidwrite(Object payload, OutputStream stream) Writes the actual response object to theOutputStream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.getelements.elements.rt.PayloadWriter
write
-
Constructor Details
-
ObjectMapperPayloadWriter
public ObjectMapperPayloadWriter()
-
-
Method Details
-
write
Description copied from interface:PayloadWriterWrites the actual response object to theOutputStream.- Specified by:
writein interfacePayloadWriter- Parameters:
payload- the the response objectstream- the output stream- Throws:
IOException
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
setObjectMapper
@Inject public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-