Class MediaTypeRegistry

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

public class MediaTypeRegistry extends Object implements io.vertx.lang.rx.RxDelegate
The MediaTypeRegistry contains all supported MediaTypes and Validators for the mediatypes. New MediaTypes can be registered by providing new MediaTypeRegistrations.

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<MediaTypeRegistry> __TYPE_ARG
  • Constructor Details

    • MediaTypeRegistry

      public MediaTypeRegistry(MediaTypeRegistry delegate)
    • MediaTypeRegistry

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

      public static MediaTypeRegistry createDefault()
      Creates a default registry with application/json, application/multipart and text/plain mediatypes registered.
      Returns:
      A registry with default options.
    • createEmpty

      public static MediaTypeRegistry createEmpty()
      Creates an empty registry.
      Returns:
      An empty registry.
    • register

      public MediaTypeRegistry register(MediaTypeRegistration registration)
      Registers a new MediaTypeHandler
      Parameters:
      registration - The mediatype registration.
      Returns:
      This registry for a fluent interface.
    • isSupported

      public boolean isSupported(String type)
      Checks if the provided media type is supported by the registration
      Parameters:
      type - The raw mediatype string
      Returns:
      true if it supported, false otherwise
    • supportedTypes

      public List<String> supportedTypes()
      Returns:
      A list of all supported types.
    • get

      public MediaTypeRegistration get(String mediaType)
      Finds the registration for the provided media type.
      Parameters:
      mediaType - The media type to find the registration for.
      Returns:
      The registration if found, null otherwise.
    • newInstance

      public static MediaTypeRegistry newInstance(MediaTypeRegistry arg)