Class ClientResponseMediaTypeDeterminer

java.lang.Object
org.glassfish.jersey.internal.routing.ContentTypeDeterminer
org.glassfish.jersey.client.internal.routing.ClientResponseMediaTypeDeterminer

public class ClientResponseMediaTypeDeterminer extends ContentTypeDeterminer
Client side Response utility class determining the media type. Used for determining media type when ClientRequestContext.abortWith(Response) on ClientRequestFilter.filter(ClientRequestContext) is used without specifying the response media type.
  • Constructor Details

    • ClientResponseMediaTypeDeterminer

      public ClientResponseMediaTypeDeterminer(MessageBodyWorkers workers)
      Constructor providing the MessageBodyWorkers that specify the media types.
      Parameters:
      workers - MessageBodyWorkers that specify the media types.
  • Method Details

    • setResponseMediaTypeIfNotSet

      public void setResponseMediaTypeIfNotSet(Response response, Configuration configuration)
      Set the Response media type if not correctly set by the user. The media type is determined by the entity type and provided MessageBodyWorkers.
      Parameters:
      response - the response containing the HTTP headers, entity and that is eventually updated.
      configuration - the runtime configuration settings.