Class ContentAnalyser

java.lang.Object
io.vertx.reactivex.openapi.mediatype.ContentAnalyser
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class ContentAnalyser extends Object implements io.vertx.lang.rx.RxDelegate
The content analyser is responsible to check if a request or response has the correct format i.e. is syntactically correct, and to transform the content-buffer into a representation that can be validated against a schema.

These two methods are intentionally bundled in ContentAnalyser to prevent some operations from having to be performed twice. This is particularly helpful if a library is used that cannot distinguish between these steps. In this case, an intermediate result that was generated in checkSyntacticalCorrectness(), for example, can be reused.

Therefore, it is very important to ensure that the checkSyntacticalCorrectness() method is always called before.

NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final io.vertx.lang.rx.TypeArg<ContentAnalyser> __TYPE_ARG
  • Constructor Details

    • ContentAnalyser

      public ContentAnalyser(ContentAnalyser delegate)
    • ContentAnalyser

      public ContentAnalyser(Object delegate)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getDelegate

      public ContentAnalyser getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • checkSyntacticalCorrectness

      public void checkSyntacticalCorrectness()
      Checks if the content has the expected format i.e. is syntactically correct.

      Throws a if the content is syntactically incorrect.

    • transform

      public Object transform()
      Transforms the content into a format that can be validated by the RequestValidator, or ResponseValidator.

      Throws a if the content can't be transformed.

      Returns:
      the transformed content.
    • newInstance

      public static ContentAnalyser newInstance(ContentAnalyser arg)