Class JacksonHandler<B>

java.lang.Object
dev.relism.flash.models.RequestHandler
dev.relism.flash.models.BodyHandler<B>
dev.relism.flash.ext.jackson.JacksonHandler<B>
Type Parameters:
B - the body type, which is also what the published OpenAPI document describes

public abstract class JacksonHandler<B> extends dev.relism.flash.models.BodyHandler<B>
A handler whose body one Jackson format parses and whose constraints are checked before it arrives.

Format modules extend this and name their codec — JsonHandler, XmlHandler. An application extends those, never this one.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final B
    body(dev.relism.flash.models.Request request)
     
    protected abstract Codec
    The format this handler speaks.

    Methods inherited from class dev.relism.flash.models.BodyHandler

    bodyType, bodyTypeOf, handle, handle

    Methods inherited from class dev.relism.flash.models.RequestHandler

    bind, find, onInit, optional, require

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JacksonHandler

      protected JacksonHandler()
  • Method Details

    • codec

      protected abstract Codec codec()
      The format this handler speaks. Injected by the subclass, resolved once at boot.
    • body

      protected final B body(dev.relism.flash.models.Request request) throws Exception
      Specified by:
      body in class dev.relism.flash.models.BodyHandler<B>
      Throws:
      Exception