Class ContentConverter.ContentValidationPlugin

java.lang.Object
com.mastfrog.acteur.ContentConverter.ContentValidationPlugin
Enclosing class:
ContentConverter

public abstract static class ContentConverter.ContentValidationPlugin extends Object
  • Constructor Details

  • Method Details

    • register

      protected final <T> ContentConverter.ContentValidationPlugin register(Class<T> type)
    • validate

      protected abstract <T> void validate(io.netty.buffer.ByteBuf buf, com.mastfrog.mime.MimeType mimeType, Class<T> type, Codec codec) throws Exception
      Validate the contents of a bytebuf without necessarily instantiating an object. Throw an exception of some known type (may want to install an ExceptionEvaluator to turn that into a meaningful response code).
      Type Parameters:
      T - The type
      Parameters:
      buf - The buffer
      mimeType -
      type -
      codec -
      Throws:
      Exception
    • validate

      protected abstract <T> void validate(Class<T> type, Map<String,?> map)
      Validate a map which will be further deserialized into an object of type T. Throw an exception of some known type (may want to install an ExceptionEvaluator to turn that into a meaningful response code).
      Type Parameters:
      T - The type
      Parameters:
      type - The type
      map - The map