java.lang.Object
org.springframework.core.codec.AbstractEncoder<T>
org.springframework.core.codec.AbstractSingleValueEncoder<Object>
io.jstach.opt.spring.webflux.JStachioEncoder
Encodes a JStachio model into a bytes to be used as output from a webflux reactive
controller.
- Author:
- agentgt, dsyer
-
Constructor Summary
ConstructorsConstructorDescriptionJStachioEncoder(JStachio jstachio) Create the encoder from a JStachioJStachioEncoder(JStachio jstachio, int allocateBufferSize) Create the encoder from a JStachio -
Method Summary
Modifier and TypeMethodDescriptionbooleancanEncode(ResolvableType elementType, @Nullable MimeType mimeType) encodeValue(Object event, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String, Object> hints) Methods inherited from class org.springframework.core.codec.AbstractSingleValueEncoder
encodeMethods inherited from class org.springframework.core.codec.AbstractEncoder
getEncodableMimeTypes, getLogger, setLoggerMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.codec.Encoder
getEncodableMimeTypes
-
Constructor Details
-
JStachioEncoder
Create the encoder from a JStachio- Parameters:
jstachio- notnull.
-
JStachioEncoder
Create the encoder from a JStachio- Parameters:
jstachio- notnull.allocateBufferSize- how much to initially allocate from the buffer factory
-
-
Method Details
-
canEncode
-
encodeValue
public DataBuffer encodeValue(Object event, DataBufferFactory bufferFactory, ResolvableType valueType, MimeType mimeType, Map<String, Object> hints)
-