Class MediaTypeRegistration

java.lang.Object
io.vertx.rxjava3.openapi.mediatype.MediaTypeRegistration
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class MediaTypeRegistration extends Object implements io.vertx.lang.rx.RxDelegate
A MediaTypeRegistration is used to register mediatypes to the openapi mediatype registry. It consists of a predicate that checks if a media type can be handled by the created content analysers.

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

  • Field Details

  • Constructor Details

    • MediaTypeRegistration

      public MediaTypeRegistration(MediaTypeRegistration delegate)
    • MediaTypeRegistration

      public MediaTypeRegistration(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 MediaTypeRegistration getDelegate()
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • createContentAnalyser

      public ContentAnalyser createContentAnalyser(String contentType, Buffer content, ValidationContext context)
      Creates a new ContentAnalyser. This is required, because ContentAnalyser could be stateful.
      Parameters:
      contentType - The raw content type from the http headers.
      content - The content of the request or response.
      context - Whether the analyser is for a request or response.
      Returns:
      A fresh content analyser instance.
    • canHandle

      public boolean canHandle(String mediaType)
      Checks if this registration can handle the given media type. This method is intended to be used by the MediaTypeRegistry.
      Parameters:
      mediaType - The media type to check
      Returns:
      true if the mediatype can be handled, false otherwise
    • supportedTypes

      public List<String> supportedTypes()
      This method is intended for reporting of supported media types in the system.
      Returns:
      The list of supported types.
    • newInstance

      public static MediaTypeRegistration newInstance(MediaTypeRegistration arg)