Class ContentTypeDeterminer
java.lang.Object
org.glassfish.jersey.internal.routing.ContentTypeDeterminer
- Direct Known Subclasses:
ClientResponseMediaTypeDeterminer
Utility class containing methods used on both client and server side for determining media type of a response based
on provided
MessageBodyWorkers
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MediaType
determineResponseMediaType
(Class<?> entityClass, Type entityType, RequestSpecificConsumesProducesAcceptor<?> selectedMethod, List<AcceptableMediaType> acceptableMediaTypes, List<MediaType> methodProducesTypes, Annotation[] handlingMethodAnnotations)
-
Field Details
-
workers
-
-
Constructor Details
-
ContentTypeDeterminer
-
-
Method Details
-
determineResponseMediaType
protected MediaType determineResponseMediaType(Class<?> entityClass, Type entityType, RequestSpecificConsumesProducesAcceptor<?> selectedMethod, List<AcceptableMediaType> acceptableMediaTypes, List<MediaType> methodProducesTypes, Annotation[] handlingMethodAnnotations) Determine theMediaType
of theResponse
based on writers suitable for the given entity class, pre-selected method and acceptable media types.- Parameters:
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- Returns:
- media type of the response.
-