java.lang.Object
org.springframework.core.codec.AbstractEncoder<T>
org.springframework.core.codec.AbstractSingleValueEncoder<Object>
io.jstach.opt.spring.webflux.JStachioEncoder
- All Implemented Interfaces:
org.springframework.core.codec.Encoder<Object>
public class JStachioEncoder
extends org.springframework.core.codec.AbstractSingleValueEncoder<Object>
Encodes a JStachio model into a bytes to be used as output from a webflux reactive
controller.
- Author:
- agentgt, dsyer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canEncode
(org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType) org.springframework.core.io.buffer.DataBuffer
encodeValue
(Object event, org.springframework.core.io.buffer.DataBufferFactory bufferFactory, org.springframework.core.ResolvableType valueType, org.springframework.util.MimeType mimeType, Map<String, Object> hints) Methods inherited from class org.springframework.core.codec.AbstractSingleValueEncoder
encode
Methods inherited from class org.springframework.core.codec.AbstractEncoder
getEncodableMimeTypes, getLogger, setLogger
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.core.codec.Encoder
getEncodableMimeTypes
-
Constructor Details
-
JStachioEncoder
Create the encoder from a JStachio- Parameters:
jstachio
- notnull
.
-
-
Method Details
-
canEncode
public boolean canEncode(org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType) -
encodeValue
public org.springframework.core.io.buffer.DataBuffer encodeValue(Object event, org.springframework.core.io.buffer.DataBufferFactory bufferFactory, org.springframework.core.ResolvableType valueType, org.springframework.util.MimeType mimeType, Map<String, Object> hints)
-