Class JStachioEncoder

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

    Constructors
    Constructor
    Description
    Create the encoder from a JStachio
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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

      public JStachioEncoder(JStachio jstachio)
      Create the encoder from a JStachio
      Parameters:
      jstachio - not null.
  • Method Details

    • canEncode

      public boolean canEncode(org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType)
      Specified by:
      canEncode in interface org.springframework.core.codec.Encoder<Object>
      Overrides:
      canEncode in class org.springframework.core.codec.AbstractEncoder<Object>
    • 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)