Class MediaTypeVoter

java.lang.Object
org.hawaiiframework.logging.config.MediaTypeVoter

public class MediaTypeVoter extends Object
Media type voter allows configuration of allowed media types.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MediaTypeVoter(List<org.springframework.http.MediaType> contentTypes, boolean matchIfEmpty)
    The constructor with content types and whether to match if there are no content types.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    mediaTypeMatches(String contentType)
    Check if the mediaType is one of the configured content type.
    boolean
    mediaTypeMatches(org.springframework.http.MediaType mediaType)
    Check if the mediaType is one of the configured content type.

    Methods inherited from class java.lang.Object

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

    • MediaTypeVoter

      public MediaTypeVoter(List<org.springframework.http.MediaType> contentTypes, boolean matchIfEmpty)
      The constructor with content types and whether to match if there are no content types.
  • Method Details

    • mediaTypeMatches

      public boolean mediaTypeMatches(String contentType)
      Check if the mediaType is one of the configured content type.
    • mediaTypeMatches

      public boolean mediaTypeMatches(org.springframework.http.MediaType mediaType)
      Check if the mediaType is one of the configured content type.