Class ContentSelector

java.lang.Object
dk.mada.jaxrs.model.api.ContentSelector

public class ContentSelector extends Object
Selects content based on configuration. Some requests or responses may contain multiple media-types. The options parser-api-preferred-response-mediatypes and parser-api-preferred-reply-mediatypes can be used to control which type is selected.
  • Field Details

    • PARSER_API_PREFERRED_REQUEST_MEDIATYPES

      public static final String PARSER_API_PREFERRED_REQUEST_MEDIATYPES
      Preferred request media types option name. Not a super placement!
      See Also:
    • PARSER_API_PREFERRED_RESPONSE_MEDIATYPES

      public static final String PARSER_API_PREFERRED_RESPONSE_MEDIATYPES
      Preferred response media types option name. Not a super placement!
      See Also:
  • Constructor Details

    • ContentSelector

      public ContentSelector(List<Pattern> preferredRequestMediaTypes, List<Pattern> preferredResponseMediaTypes)
      Constructs a new selector instance.
      Parameters:
      preferredRequestMediaTypes - a list of patterns for matching request media types
      preferredResponseMediaTypes - a list of patterns for matching response media types
  • Method Details