Class ContentTypeDeterminer

Direct Known Subclasses:

public class ContentTypeDeterminer extends Object
Utility class containing methods used on both client and server side for determining media type of a response based on provided MessageBodyWorkers.
  • Field Details

  • Constructor Details

  • Method Details

    • determineResponseMediaType

      protected MediaType determineResponseMediaType(Class<?> entityClass, Type entityType, RequestSpecificConsumesProducesAcceptor<?> selectedMethod, List<AcceptableMediaType> acceptableMediaTypes, List<MediaType> methodProducesTypes, Annotation[] handlingMethodAnnotations)
      Determine the MediaType of the Response based on writers suitable for the given entity class, pre-selected method and acceptable media types.
      entityClass - entity class to determine the media type for.
      entityType - entity type for writers.
      selectedMethod - pre-selected (invoked) method.
      acceptableMediaTypes - acceptable media types from request.
      methodProducesTypes - media types producible by resource method
      media type of the response.